X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_connectban.cpp;h=f9dc37b36ff9910530d8fad64e57e6d9ad4fb69c;hb=46e56dedd37abe33af4e8b970d5b83729dc1ef05;hp=735f3da99123a034858dc7c1134bc1657936d7e5;hpb=b43fc66c17c2bef6dca66a966676b8128d5774ee;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index 735f3da99..f9dc37b36 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -81,7 +81,7 @@ class ModuleConnectBan : public Module break; } - irc::string mask = assign(irc::sockets::mask(u->client_sa, range)); + irc::sockets::cidr_mask mask(u->client_sa, range); i = connects.find(mask); if (i != connects.end()) @@ -91,15 +91,15 @@ 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.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 delete zl; ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z:line on *@%s to expire on %s: Connect flooding", - mask.c_str(), ServerInstance->TimeString(zl->expiry).c_str()); - ServerInstance->SNO->WriteGlobalSno('a', "Connect flooding from IP range %s (%d)", mask.c_str(), threshold); + 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); connects.erase(i); } }