diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-09 20:07:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-09 20:07:31 +0000 |
commit | e247a0fcd9cca5820339da330aaff3d334229146 (patch) | |
tree | 5480b27b87aed2a28a3e379556b21e2af7234980 /src/modules | |
parent | 56634da4a70b8ac506fc12a7c8cd77d94ccb3d4a (diff) |
Move around the initialization stuff so it gets called in the right order
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5895 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index d1fbbb502..206b5c3a1 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3833,6 +3833,25 @@ SpanningTreeUtilities::SpanningTreeUtilities(InspIRCd* Instance, ModuleSpanningT Bindings.clear(); this->ReadConfiguration(true); this->TreeRoot = new TreeServer(this, ServerInstance, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc); + + modulelist* ml = ServerInstance->FindInterface("InspSocketHook"); + + /* Did we find any modules? */ + if (ml) + { + /* Yes, enumerate them all to find out the hook name */ + for (modulelist::iterator m = ml->begin(); m != ml->end(); m++) + { + /* Make a request to it for its name, its implementing + * InspSocketHook so we know its safe to do this + */ + std::string name = InspSocketNameRequest((Module*)Creator, *m).Send(); + /* Build a map of them */ + hooks[name.c_str()] = *m; + hooknames.push_back(name); + ServerInstance->Log(DEBUG, "Found InspSocketHook interface: '%s' -> '%08x'", name.c_str(), *m); + } + } } SpanningTreeUtilities::~SpanningTreeUtilities() @@ -4222,26 +4241,6 @@ class ModuleSpanningTree : public Module } else SyncTimer = NULL; - - modulelist* ml = ServerInstance->FindInterface("InspSocketHook"); - - /* Did we find any modules? */ - if (ml) - { - /* Yes, enumerate them all to find out the hook name */ - for (modulelist::iterator m = ml->begin(); m != ml->end(); m++) - { - /* Make a request to it for its name, its implementing - * InspSocketHook so we know its safe to do this - */ - std::string name = InspSocketNameRequest(this, *m).Send(); - /* Build a map of them */ - Utils->hooks[name.c_str()] = *m; - Utils->hooknames.push_back(name); - - ServerInstance->Log(DEBUG, "Found InspSocketHook interface: '%s' -> '%08x'", name.c_str(), *m); - } - } } void ShowLinks(TreeServer* Current, userrec* user, int hops) |