From 6748baf9650c603fc402b51113aa7386ed255f3c Mon Sep 17 00:00:00 2001 From: Alnotz Date: Sat, 22 Jul 2023 23:24:15 +0200 Subject: [PATCH] Weechat plugin Essai added --- weechat-plugins/essai/essai.c | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 weechat-plugins/essai/essai.c diff --git a/weechat-plugins/essai/essai.c b/weechat-plugins/essai/essai.c new file mode 100644 index 0000000..fe458a3 --- /dev/null +++ b/weechat-plugins/essai/essai.c @@ -0,0 +1,43 @@ +/* +gcc \$(pkg-config --cflags weechat) -shared -fPIC -Wall -Wextra essai.c -o essai.so $(pkg-config --libs weechat) +*/ +#include +#include + +WEECHAT_PLUGIN_NAME("essai"); +WEECHAT_PLUGIN_DESCRIPTION("Plugin just to test the library :-/"); +WEECHAT_PLUGIN_AUTHOR("Alnotz"); +WEECHAT_PLUGIN_VERSION("0.1.0"); +WEECHAT_PLUGIN_LICENSE("GPL-3.0-or-later"); +WEECHAT_PLUGIN_PRIORITY(999); + +struct t_weechat_plugin *weechat_plugin = NULL; + +int command_essai(const void *pointer, + void *data, + struct t_gui_buffer *buffer, + int argc, + char **argv, + char **argv_eol){ + /*Rien*/ + return WEECHAT_RC_OK; +} + +int weechat_plugin_init(struct t_weechat_plugin *plugin, + int argc, + char *argv[]){ + weechat_plugin = plugin; + weechat_hook_command("essai", + "Une commande d’essai", + "", + "Aucun paramètre", + NULL, + &command_essai, + NULL, + NULL); + return WEECHAT_RC_OK; +} + +int weechat_plugin_end(struct t_weechat_plugin *plugins){ + return WEECHAT_RC_OK; +}