]> jfr.im git - solanum.git/blobdiff - modules/m_dline.c
dline,kline: Avoid breaking the protocol with bad bans.
[solanum.git] / modules / m_dline.c
index bb928ac4c92a02686dccfdaf6e6bf15b1c7632bd..f3a40cea3e6935a8a0eacb5ad2719c53bf936912 100644 (file)
@@ -96,9 +96,15 @@ mo_dline(struct Client *client_p, struct Client *source_p, int parc, const char
 
        dlhost = parv[loc];
        rb_strlcpy(cidr_form_host, dlhost, sizeof(cidr_form_host));
-
        loc++;
 
+       /* would break the protocol */
+       if (*dlhost == ':')
+       {
+               sendto_one_notice(source_p, ":Invalid D-Line");
+               return 0;
+       }
+
        if(parc >= loc + 2 && !irccmp(parv[loc], "ON"))
        {
                if(!IsOperRemoteBan(source_p))