aboutsummaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-09-23 22:50:30 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2016-09-23 22:50:30 +0200
commit92a4d4b5a7b276ab7a606d876d03fb346f4ceda4 (patch)
treed5ccf6d7cf73e2feb5050b7e7d09aa47beaf7e26 /kike.c
parent26f94d24592e0deecbfe10d39fde1a6e1d83d9dd (diff)
downloadxK-92a4d4b5a7b276ab7a606d876d03fb346f4ceda4.tar.gz
xK-92a4d4b5a7b276ab7a606d876d03fb346f4ceda4.tar.xz
xK-92a4d4b5a7b276ab7a606d876d03fb346f4ceda4.zip
Better support for the KILL command
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kike.c b/kike.c
index deff370..e47c9aa 100644
--- a/kike.c
+++ b/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);