]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
Remove ModuleManager::GetAllModuleNames(), use GetModules() instead
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index 98f9a304bb2e7f36f881813b545b11ceef7736cd..1e59e1607c52ff83eab584af002d535d4cfa1a65 100644 (file)
@@ -618,7 +618,7 @@ void ModuleSpanningTree::OnPreRehash(User* user, const std::string &parameter)
        }
 }
 
-void ModuleSpanningTree::OnRehash(User* user)
+void ModuleSpanningTree::ReadConfig(ConfigStatus& status)
 {
        // Re-read config stuff
        try
@@ -633,7 +633,7 @@ void ModuleSpanningTree::OnRehash(User* user)
                std::string msg = "Error in configuration: ";
                msg.append(e.GetReason());
                ServerInstance->SNO->WriteToSnoMask('l', msg);
-               if (user && !IS_LOCAL(user))
+               if (status.srcuser && !IS_LOCAL(status.srcuser))
                        ServerInstance->PI->SendSNONotice("L", msg);
        }
 }
@@ -669,6 +669,13 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod)
                        sock->Close();
                }
        }
+
+       for (SpanningTreeUtilities::TimeoutList::const_iterator i = Utils->timeoutlist.begin(); i != Utils->timeoutlist.end(); ++i)
+       {
+               TreeSocket* sock = i->first;
+               if (sock->GetIOHook() && sock->GetIOHook()->creator == mod)
+                       sock->Close();
+       }
 }
 
 // note: the protocol does not allow direct umode +o except