From 821cdf4b1066ad5788ece5757e78a323191488ed Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 4 Feb 2009 13:07:43 +0000 Subject: Prioritize nicklock before nickflood, so nickflood does not erroneously count changes that nicklock blocks. Fixes bug #687, reported by Ankit. TODO: split OnUserPreNick into OnCanChangeNick, to determine whether or not a user may strictly change nick or not? git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11030 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_nicklock.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/m_nicklock.cpp') diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 40965ffe0..091d3e3d1 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -147,6 +147,12 @@ class ModuleNickLock : public Module user->Shrink("nick_locked"); } + void Prioritize() + { + Module *nflood = ServerInstance->Modules->Find("m_nickflood.so"); + ServerInstance->Modules->SetPriority(this, I_OnUserPreJoin, PRIO_BEFORE, &nflood); + } + virtual void OnCleanup(int target_type, void* item) { if(target_type == TYPE_USER) -- cgit v1.2.3