diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-03-03 23:20:12 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-03-11 20:48:58 +0100 |
commit | e59bb59ea29e73bf66139e9d5eab6d1b572e308d (patch) | |
tree | b1200c22eb5e8ec24f438aa78db8a690478147a4 /src | |
parent | fe9e5947552cc8b044a7ce47ffbee06ee7283886 (diff) |
m_connectban Switch to OnSetUserIP hook to handle cgiirc users properly, ignore e-lined users
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_connectban.cpp | 7 |
1 files 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; |