]> jfr.im git - irc/DALnet/bahamut.git/commitdiff
Allow WEBIRC hosts to have a semicolon too (for IPv6 IP addresses)
authorKobi Shmueli <redacted>
Sat, 17 Nov 2018 06:23:29 +0000 (08:23 +0200)
committerKobi Shmueli <redacted>
Sat, 17 Nov 2018 06:23:29 +0000 (08:23 +0200)
src/m_webirc.c

index 226f87673f03bdef5ac6b90e854e88309f40f1f6..8292043e86f37c9eaa7e1fb8cf879eb3fc62a34b 100644 (file)
@@ -100,7 +100,7 @@ int m_webirc(aClient *cptr, aClient *sptr, int parc, char *parv[])
     }
 
     /* Don't allow WEBIRC to use 0.0.0.*, 127.0.0.* or Staff_Address -Kobi_S. */
-    if(!strncmp(parv[3],"0.0.0.",6) || !strncmp(parv[3],"127.0.0.",8) || !strcasecmp(parv[3],Staff_Address) || !strcasecmp(parv[3],DEFAULT_STAFF_ADDRESS) || !strchr(parv[3],'.') || !strncmp(parv[4],"0.0.0.",6) || !strncmp(parv[4],"127.",4))
+    if(!strncmp(parv[3],"0.0.0.",6) || !strncmp(parv[3],"127.0.0.",8) || !strcasecmp(parv[3],Staff_Address) || !strcasecmp(parv[3],DEFAULT_STAFF_ADDRESS) || (!strchr(parv[3],'.') && !strchr(parv[3],':')) || !strncmp(parv[4],"0.0.0.",6) || !strncmp(parv[4],"127.",4))
     {
         sendto_realops_lev(SPY_LEV, "WEBIRC: %s@%s tried to spoof %s (%s)",
                            oldusername, sptr->sockhost,