summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index 5ead3a4..5ad27fb 100644
--- a/degesch.c
+++ b/degesch.c
@@ -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;