From e59bb59ea29e73bf66139e9d5eab6d1b572e308d Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 3 Mar 2013 23:20:12 +0100 Subject: m_connectban Switch to OnSetUserIP hook to handle cgiirc users properly, ignore e-lined users --- src/modules/m_connectban.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index 798f06fb6..dc2bc3f18 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -33,7 +33,7 @@ class ModuleConnectBan : public Module public: void init() { - Implementation eventlist[] = { I_OnUserConnect, I_OnGarbageCollect, I_OnRehash }; + Implementation eventlist[] = { I_OnSetUserIP, I_OnGarbageCollect, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } @@ -68,8 +68,11 @@ class ModuleConnectBan : public Module banduration = 10*60; } - virtual void OnUserConnect(LocalUser *u) + virtual void OnSetUserIP(LocalUser* u) { + if (u->exempt) + return; + int range = 32; clonemap::iterator i; -- cgit v1.2.3