]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_chghost.c
Filter bogus CTCP ACTION messages.
[irc/rqf/shadowircd.git] / modules / m_chghost.c
index 57bffa977bc8fe604aa37025e6e958313a09ea4e..647ee68b3661229f52d088fbce59aa5061cd16df 100644 (file)
@@ -57,6 +57,7 @@ static int
 clean_host(const char *host)
 {
        int len = 0;
+       const char *last_slash = 0;
        
        if (*host == '\0' || *host == ':')
                return 0;
@@ -67,11 +68,16 @@ clean_host(const char *host)
 
                if(!IsHostChar(*host))
                        return 0;
+               if(*host == '/')
+                       last_slash = host;
        }
 
        if(len > HOSTLEN)
                return 0;
 
+       if(last_slash && IsDigit(last_slash[1]))
+               return 0;
+
        return 1;
 }