X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/ac408af6cba5a230c66186d4389e60766c3a74a4..0827f524e0ce124dc9c99c6c8c52165aa35e49ed:/modules/m_chghost.c diff --git a/modules/m_chghost.c b/modules/m_chghost.c index 57bffa9..647ee68 100644 --- a/modules/m_chghost.c +++ b/modules/m_chghost.c @@ -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; }