]> jfr.im git - solanum.git/blobdiff - modules/m_kline.c
dline,kline: Avoid breaking the protocol with bad bans.
[solanum.git] / modules / m_kline.c
index 89ba2353344abf36250841176cc4144a36addf53..373fdfbda2851d0d04a07a419f28346b8bb22feb 100644 (file)
@@ -669,6 +669,13 @@ find_user_host(struct Client *source_p, const char *userhost, char *luser, char
                rb_strlcpy(lhost, userhost, HOSTLEN + 1);
        }
 
+       /* would break the protocol */
+       if (*luser == ':' || *lhost == ':')
+       {
+               sendto_one_notice(source_p, ":Invalid K-Line");
+               return 0;
+       }
+
        return 1;
 }