Better support for the KILL command
This commit is contained in:
5
kike.c
5
kike.c
@@ -2991,6 +2991,11 @@ irc_handle_kill (const struct irc_message *msg, struct client *c)
|
||||
struct client *target;
|
||||
if (!(target = str_map_find (&c->ctx->users, msg->params.vector[0])))
|
||||
RETURN_WITH_REPLY (c, IRC_ERR_NOSUCHNICK, msg->params.vector[0]);
|
||||
|
||||
client_send (target, ":%s!%s@%s KILL %s :%s",
|
||||
c->nickname, c->username, c->hostname,
|
||||
target->nickname, msg->params.vector[1]);
|
||||
|
||||
char *reason = xstrdup_printf ("Killed by %s: %s",
|
||||
c->nickname, msg->params.vector[1]);
|
||||
client_close_link (target, reason);
|
||||
|
||||
Reference in New Issue
Block a user