]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_connectban.cpp
Attempt to revert r11734
[user/henk/code/inspircd.git] / src / modules / m_connectban.cpp
index 19408046fcc4356889d07d8e31d5090140bfae68..4d5011575691aeadc630fe099539a7753134f4a0 100644 (file)
@@ -72,19 +72,13 @@ class ModuleConnectBan : public Module
                int range = 32;
                clonemap::iterator i;
 
-               switch (u->GetProtocolFamily())
+               switch (u->client_sa.sa.sa_family)
                {
-       #ifdef SUPPORT_IP6LINKS
                        case AF_INET6:
-                       {
                                range = ipv6_cidr;
-                       }
                        break;
-       #endif
                        case AF_INET:
-                       {
                                range = ipv4_cidr;
-                       }
                        break;
                }
 
@@ -103,7 +97,9 @@ class ModuleConnectBan : public Module
                                else
                                        delete zl;
 
-                               ServerInstance->SNO->WriteToSnoMask('x', "Connect flooding from IP range %s (%d)", u->GetCIDRMask(range), threshold);
+                               ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z:line on *@%s to expire on %s: Connect flooding", 
+                                       u->GetCIDRMask(range), ServerInstance->TimeString(zl->expiry).c_str());
+                               ServerInstance->SNO->WriteGlobalSno('a', "Connect flooding from IP range %s (%d)", u->GetCIDRMask(range), threshold);
                                connects.erase(i);
                        }
                }