]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_connectban.cpp
wrong order of arguments to Host()
[user/henk/code/inspircd.git] / src / modules / m_connectban.cpp
index f831a3b77b1ba50873c374efe77a065f29d8d1ed..aebe9a4ca8a3eaa5ccbd6e45882e75d402633de0 100644 (file)
@@ -20,7 +20,7 @@
 #include "inspircd.h"
 #include "xline.h"
 
-/* $ModDesc: Throttles the connections of any users who try connect flood */
+/* $ModDesc: Throttles the connections of IP ranges who try to connect flood. */
 
 class ModuleConnectBan : public Module
 {
@@ -43,7 +43,7 @@ class ModuleConnectBan : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Throttles the connections of any users who try connect flood", VF_VENDOR);
+               return Version("Throttles the connections of IP ranges who try to connect flood.", VF_VENDOR);
        }
 
        virtual void OnRehash(User* user)
@@ -103,9 +103,11 @@ class ModuleConnectBan : public Module
                                else
                                        delete zl;
 
-                               ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z:line on *@%s to expire on %s: Connect flooding", 
-                                       mask.str().c_str(), ServerInstance->TimeString(zl->expiry).c_str());
-                               ServerInstance->SNO->WriteGlobalSno('a', "Connect flooding from IP range %s (%d)", mask.str().c_str(), threshold);
+                               std::string maskstr = mask.str();
+                               std::string timestr = ServerInstance->TimeString(zl->expiry);
+                               ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z:line on *@%s to expire on %s: Connect flooding",
+                                       maskstr.c_str(), timestr.c_str());
+                               ServerInstance->SNO->WriteGlobalSno('a', "Connect flooding from IP range %s (%d)", maskstr.c_str(), threshold);
                                connects.erase(i);
                        }
                }