X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fmain.cpp;h=1e59e1607c52ff83eab584af002d535d4cfa1a65;hb=c202dea024542b9c6c6b771bb9a3a081d9eacdc5;hp=f458c2d2f86a44aff9811159f301a03d8726e368;hpb=7e7e773d4d43e68c18c19e2ec712f4250e5f756d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index f458c2d2f..1e59e1607 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -422,10 +422,7 @@ void ModuleSpanningTree::OnPostTopicChange(User* user, Channel* chan, const std: if (!IS_LOCAL(user)) return; - CmdBuilder params(user->uuid, "TOPIC"); - params.push_back(chan->name); - params.push_last(topic); - params.Broadcast(); + CommandFTopic::Builder(user, chan).Broadcast(); } void ModuleSpanningTree::OnUserMessage(User* user, void* dest, int target_type, const std::string& text, char status, const CUList& exempt_list, MessageType msgtype) @@ -621,7 +618,7 @@ void ModuleSpanningTree::OnPreRehash(User* user, const std::string ¶meter) } } -void ModuleSpanningTree::OnRehash(User* user) +void ModuleSpanningTree::ReadConfig(ConfigStatus& status) { // Re-read config stuff try @@ -636,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); } } @@ -672,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