diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-11-05 13:29:54 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-11-05 13:29:54 +0100 |
commit | a97e2955be68a91f0e55bbced190e5966bf3391d (patch) | |
tree | aac727043dd76feb0c23f4f5d0c4afbf18b9ff24 /src/plugins/demo | |
parent | a98feff2bb2b85d1fff33f511ca645f04f2af1ff (diff) | |
download | weechat-a97e2955be68a91f0e55bbced190e5966bf3391d.zip |
Added keep_eol flag to string_explode(), updated hook command callback arguments
Diffstat (limited to 'src/plugins/demo')
-rw-r--r-- | src/plugins/demo/demo.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index 16c55323b..9b63e63a6 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -55,7 +55,7 @@ demo_print_list (void *list, char *item_name) fields = weechat_list_fields (list); if (fields) { - argv = weechat_string_explode (fields, ",", 0, &argc); + argv = weechat_string_explode (fields, ",", 0, 0, &argc); if (argv && (argc > 0)) { for (j = 0; j < argc; j++) @@ -119,14 +119,15 @@ demo_buffer_infos () */ static int -demo_command (void *data, char *args) +demo_command (void *data, int argc, char **argv, char **argv_eol) { /* make C compiler happy */ (void) data; - - if (args) + (void) argv_eol; + + if (argc > 1) { - if (weechat_strcasecmp (args, "buffer") == 0) + if (weechat_strcasecmp (argv[1], "buffer") == 0) { demo_buffer_infos (); return PLUGIN_RC_SUCCESS; |