degesch: fix /kickban
This commit is contained in:
parent
5a3b8f8eee
commit
782bc85336
14
degesch.c
14
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");
|
"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;
|
||||||
|
|
Loading…
Reference in New Issue