degesch: fix /kickban

This commit is contained in:
Přemysl Eric Janouch 2015-06-18 08:47:52 +02:00
parent 5a3b8f8eee
commit 782bc85336
1 changed files with 10 additions and 4 deletions

View File

@ -6405,10 +6405,16 @@ handle_command_kickban (struct app_context *ctx, char *arguments)
"no channel name given and this buffer is not a channel"); "no channel name given and this buffer is not a channel");
else if (*arguments) else if (*arguments)
{ {
// FIXME: don't include the reason char *target = cut_word (&arguments);
irc_send (s, "MODE %s +b %s", channel_name, arguments); if (strpbrk (target, "!@*?"))
// FIXME: the reason should be one argument return false;
irc_send (s, "KICK %s %s", channel_name, arguments);
// XXX: how about other masks?
irc_send (s, "MODE %s +b %s!*@*", channel_name, target);
if (*arguments)
irc_send (s, "KICK %s %s :%s", channel_name, target, arguments);
else
irc_send (s, "KICK %s %s", channel_name, target);
} }
else else
return false; return false;