Maintenant on peut faire de l'autocomplétion sur host

master
Philippe Pittoli 2011-10-27 22:47:49 +02:00
parent 22e1f638bd
commit 8c00640929
1 changed files with 6 additions and 5 deletions

View File

@ -50,7 +50,8 @@ int cb_currentsong_plugin(void *data, struct t_gui_buffer *buffer, int argc, cha
strcpy(cmd[i-1],"current"); strcpy(cmd[i-1],"current");
if(argc == 4) if(argc == 4)
{ {
strcpy(cmd[1],argv[1]); if(strcmp("host", argv[1]) == 0)
strcpy(cmd[1],"-h");
strcpy(cmd[2],argv[2]); strcpy(cmd[2],argv[2]);
} }
@ -98,10 +99,10 @@ int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]
weechat_plugin = plugin; weechat_plugin = plugin;
weechat_hook_command ("currentsong", weechat_hook_command ("currentsong",
"Affiche la chanson que vous écoutez", "Affiche le morceau que vous écoutez",
"noargs", "[host ip]",
"no arguments", "si mpd n'est pas en local : host <ip>",
NULL, "host ",
&cb_currentsong_plugin, NULL); &cb_currentsong_plugin, NULL);
return WEECHAT_RC_OK; return WEECHAT_RC_OK;