From 92a4d4b5a7b276ab7a606d876d03fb346f4ceda4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Fri, 23 Sep 2016 22:50:30 +0200
Subject: Better support for the KILL command
---
kike.c | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'kike.c')
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);
--
cgit v1.2.3