#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
{
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)
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);
}
}