diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-04 17:12:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-04 17:12:00 +0000 |
commit | c08446c3ab58782b05740d2c2bfda523acd8aeb2 (patch) | |
tree | 22f4fef25a8538582c08aef0c7f2012f9c598dda /src | |
parent | 6fe38c14c157dc155f67baf8ba8e310f7752deb2 (diff) |
Extra debug logging
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8509 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index cbfc3aeae..cf26c8e11 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -241,6 +241,13 @@ bool ModuleManager::SetPriority(Module* mod, PriorityState s) bool ModuleManager::SetPriority(Module* mod, Implementation i, PriorityState s, Module** modules, size_t sz) { + if (GetModuleName(mod) != "m_spanningtree.so") + Instance->Log(DEBUG,"ModuleManager::SetPriority called by %s, priority state %s num_modules=%u", GetModuleName(mod).c_str(), s == PRIO_BEFORE ? "PRIO_BEFORE" : + s == PRIO_AFTER ? "PRIO_AFTER" : + s == PRIO_LAST ? "PRIO_LAST" : + s == PRIO_FIRST ? "PRIO_FIRST" : "<unknown!>", + sz); + size_t swap_pos; size_t source = 0; bool swap = true; @@ -259,6 +266,16 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, PriorityState s, if (!found) return false; + Instance->Log(DEBUG,"ModuleManager::SetPriority: My position: %u", source); + + for (size_t n = 0; n < sz; ++n) + { + if (modules[n]) + Instance->Log(DEBUG," Listed Module: [%08x] %s", modules[n], GetModuleName(modules[n]).c_str()); + else + Instance->Log(DEBUG," [null module]"); + } + switch (s) { case PRIO_DONTCARE: @@ -305,6 +322,8 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, PriorityState s, if (swap) std::swap(EventHandlers[i][swap_pos], EventHandlers[i][source]); + Instance->Log(DEBUG,"Swap locations %u and %u", swap_pos, source); + return true; } |