X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_connectban.cpp;h=ae464a16cc3430b17673aa4e13986d85088a4616;hb=f25c4b7a2263f5f3ce9bb41ba56b43c0d3a6d124;hp=7c0659ad6b57ba1ac9a1f28b9701f4765a65c521;hpb=450b6385266d17d8acb6886ecda59976b08c6004;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index 7c0659ad6..ae464a16c 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -29,7 +29,7 @@ class ModuleConnectBan : public Module { Implementation eventlist[] = { I_OnUserConnect, I_OnGarbageCollect, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, 3); - OnRehash(NULL, ""); + OnRehash(NULL); } virtual ~ModuleConnectBan() @@ -41,7 +41,7 @@ class ModuleConnectBan : public Module return Version("$Id$", VF_VENDOR,API_VERSION); } - virtual void OnRehash(User* user, const std::string ¶meter) + virtual void OnRehash(User* user) { ConfigReader Conf(ServerInstance); std::string duration; @@ -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; }