]> 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 a4b4ce3e6dc2233368743baca04533b7d6452aa0..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,17 +68,21 @@ 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;
 }
 
 /*
  * me_realhost
- * parv[0] = origin
  * parv[1] = real host
  *
  * Yes this contains a little race condition if someone does a whois
@@ -140,7 +145,6 @@ do_chghost(struct Client *source_p, struct Client *target_p,
 
 /*
  * ms_chghost
- * parv[0] = origin
  * parv[1] = target
  * parv[2] = host
  */
@@ -168,7 +172,6 @@ ms_chghost(struct Client *client_p, struct Client *source_p,
 
 /*
  * me_chghost
- * parv[0] = origin
  * parv[1] = target
  * parv[2] = host
  */
@@ -188,7 +191,6 @@ me_chghost(struct Client *client_p, struct Client *source_p,
 
 /*
  * mo_chghost
- * parv[0] = origin
  * parv[1] = target
  * parv[2] = host
  */