Weechat plugin Essai added
This commit is contained in:
parent
ccfa019e77
commit
6748baf965
1 changed files with 43 additions and 0 deletions
43
weechat-plugins/essai/essai.c
Normal file
43
weechat-plugins/essai/essai.c
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
gcc \$(pkg-config --cflags weechat) -shared -fPIC -Wall -Wextra essai.c -o essai.so $(pkg-config --libs weechat)
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <weechat/weechat-plugin.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in a new issue