From cadc11999ee28545e9beb92de116c151832af5c4 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Nov 2007 18:30:43 +0000 Subject: Convert all to new Attach() system. The Implements() method needs removing from all modules as it is dead weight. WARNING: there are segfaults here! HERE BE DRAGONS, i am not finished! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8510 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index cf26c8e11..adbc4fce7 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -319,10 +319,13 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, PriorityState s, break; } - if (swap) + if (swap && (swap_pos != source)) + { std::swap(EventHandlers[i][swap_pos], EventHandlers[i][source]); - - Instance->Log(DEBUG,"Swap locations %u and %u", swap_pos, source); + Instance->Log(DEBUG,"Swap locations %u and %u", swap_pos, source); + } + else + Instance->Log(DEBUG,"No need to swap"); return true; } -- cgit v1.3.1-10-gc9f91