X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_connectban.cpp;h=81b0fcfa79f3aff3d02eeff65781896ddbcf8d13;hb=ffacccbb6fe800950af8b5914cbf5ebd3ecad99c;hp=dd9ae4f5450158180cdc98aca7467b1f9dcd3133;hpb=dc782bc846cf017475fb1c27f7cfed32db8f6518;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index dd9ae4f54..81b0fcfa7 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -1,6 +1,13 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2019 Matt Schatz + * Copyright (C) 2014 Googolplexed + * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2012-2014 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2008, 2010 Craig Edwards * Copyright (C) 2008 Robin Burchell * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -60,9 +67,15 @@ class ModuleConnectBan { } + void Prioritize() CXX11_OVERRIDE + { + Module* corexline = ServerInstance->Modules->Find("core_xline"); + ServerInstance->Modules->SetPriority(this, I_OnSetUserIP, PRIORITY_AFTER, corexline); + } + Version GetVersion() CXX11_OVERRIDE { - return Version("Throttles the connections of IP ranges who try to connect flood", VF_VENDOR); + return Version("Z-lines IP addresses which make excessive connections to the server.", VF_VENDOR); } void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE @@ -92,7 +105,7 @@ class ModuleConnectBan void OnSetUserIP(LocalUser* u) CXX11_OVERRIDE { - if (u->exempt) + if (u->exempt || u->quitting) return; irc::sockets::cidr_mask mask(u->client_sa, GetRange(u));