diff options
-rw-r--r-- | degesch.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -6405,10 +6405,16 @@ handle_command_kickban (struct app_context *ctx, char *arguments) "no channel name given and this buffer is not a channel"); else if (*arguments) { - // FIXME: don't include the reason - irc_send (s, "MODE %s +b %s", channel_name, arguments); - // FIXME: the reason should be one argument - irc_send (s, "KICK %s %s", channel_name, arguments); + char *target = cut_word (&arguments); + if (strpbrk (target, "!@*?")) + return false; + + // 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 return false; |