diff options
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 |