From 8c0064092929f90be384e53085060b5f54b730d0 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Thu, 27 Oct 2011 22:47:49 +0200 Subject: [PATCH] =?UTF-8?q?Maintenant=20on=20peut=20faire=20de=20l'autocom?= =?UTF-8?q?pl=C3=A9tion=20sur=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- C_Language/weechat_plugins/currentsong.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/C_Language/weechat_plugins/currentsong.c b/C_Language/weechat_plugins/currentsong.c index 435cfd1..3a3d48c 100644 --- a/C_Language/weechat_plugins/currentsong.c +++ b/C_Language/weechat_plugins/currentsong.c @@ -50,7 +50,8 @@ int cb_currentsong_plugin(void *data, struct t_gui_buffer *buffer, int argc, cha strcpy(cmd[i-1],"current"); if(argc == 4) { - strcpy(cmd[1],argv[1]); + if(strcmp("host", argv[1]) == 0) + strcpy(cmd[1],"-h"); 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_hook_command ("currentsong", - "Affiche la chanson que vous écoutez", - "noargs", - "no arguments", - NULL, + "Affiche le morceau que vous écoutez", + "[host ip]", + "si mpd n'est pas en local : host ", + "host ", &cb_currentsong_plugin, NULL); return WEECHAT_RC_OK;