diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-12-02 12:10:04 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-12-02 12:10:04 +0100 |
commit | e2be1dbd43575910f450793b522fda895bc9a6fb (patch) | |
tree | 00fb64e6a7664745e0d0f9d35539a6dc0427f178 /src | |
parent | 443b6962b45829618bc47089fd3d43f5b262fe10 (diff) | |
download | weechat-e2be1dbd43575910f450793b522fda895bc9a6fb.zip |
Allow channel argument without user/host for IRC command /ban
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-command.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index f5f6d3387..549abf287 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -634,14 +634,23 @@ irc_command_ban (void *data, struct t_gui_buffer *buffer, int argc, return WEECHAT_RC_OK; } } - - /* loop on users */ - while (argv[pos_args]) + + if (argv[pos_args]) + { + /* loop on users */ + while (argv[pos_args]) + { + irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "MODE %s +b %s", + pos_channel, argv[pos_args]); + pos_args++; + } + } + else { irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, - "MODE %s +b %s", - pos_channel, argv[pos_args]); - pos_args++; + "MODE %s +b", + pos_channel); } } else |