]> jfr.im git - irc/freenode/syn.git/commitdiff
Don't reveal the oper-reason part of a kline comment when killing a user instead...
authorStephen Bennett <redacted>
Thu, 30 Jul 2009 20:27:55 +0000 (21:27 +0100)
committerStephen Bennett <redacted>
Thu, 30 Jul 2009 20:27:55 +0000 (21:27 +0100)
kline.c

diff --git a/kline.c b/kline.c
index c0bce52adfffa7f2dbab9b2c41c3eb01536389ba..33c91f303ab0f53805e9092d37cf9302aace832c 100644 (file)
--- a/kline.c
+++ b/kline.c
@@ -218,7 +218,14 @@ void _syn_kill_or_kline(user_t *victim, int duration, const char *reason, ...)
     if (victim->ip[0] == '\0')
     {
         // No IP means an auth spoofed user, probably a gateway. Kill it instead.
-        _syn_vkill(victim, reason, ap);
+        // Don't give away the oper reason, though.
+        char user_reason[BUFSIZE];
+        strncpy(user_reason, reason, sizeof(user_reason));
+        char *pipe;
+        if (0 != (pipe = strchr(user_reason, '|')))
+            *pipe = '\0';
+
+        _syn_vkill(victim, user_reason, ap);
     }
     else
     {