]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_connectban.cpp
m_swhois Switch to OnPostOper hook instead of using OnPostCommand
[user/henk/code/inspircd.git] / src / modules / m_connectban.cpp
index 276962b2dc1b4c6be889cb8d226cf6b0e6d3779f..00452a8f28c9e24c6689c01ab682ebcc06b36713 100644 (file)
@@ -1,20 +1,26 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
  *
- * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ * This file is part of InspIRCd.  InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
  *
- * ---------------------------------------------------
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
 #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
 {
@@ -37,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)
@@ -91,7 +97,7 @@ class ModuleConnectBan : public Module
                        if (i->second >= threshold)
                        {
                                // Create zline for set duration.
-                               ZLine* zl = new ZLine(ServerInstance->Time(), banduration, ServerInstance->Config->ServerName.c_str(), "Connect flooding", mask.str().c_str());
+                               ZLine* zl = new ZLine(ServerInstance->Time(), banduration, ServerInstance->Config->ServerName, "Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.", mask.str());
                                if (ServerInstance->XLines->AddLine(zl,NULL))
                                        ServerInstance->XLines->ApplyLines();
                                else