X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fmain.cpp;h=9af4bfd0cdfc3ec5f5c4a36f23032f85a96b15c2;hb=b390ded3f3924cbd16a5dab53a981be279360124;hp=764c8b8ec87017684743f82d52cafaa22f27f710;hpb=ca4c4a67988419b9eb479ffcf82238dc1648b0ad;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 764c8b8ec..9af4bfd0c 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -26,6 +26,7 @@ #include "inspircd.h" #include "socket.h" #include "xline.h" +#include "iohook.h" #include "resolvers.h" #include "main.h" @@ -75,7 +76,7 @@ void ModuleSpanningTree::init() I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostTopicChange, I_OnUserMessage, I_OnBackgroundTimer, I_OnUserJoin, I_OnChangeHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule, - I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash, I_OnPreRehash, + I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRehash, I_OnPreRehash, I_OnOper, I_OnAddLine, I_OnDelLine, I_OnMode, I_OnLoadModule, I_OnStats, I_OnSetAway, I_OnPostCommand, I_OnUserConnect, I_OnAcceptConnection }; @@ -582,8 +583,7 @@ void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos) void ModuleSpanningTree::OnChangeIdent(User* user, const std::string &ident) { - // only occurs for local clients - if (user->registered != REG_ALL) + if ((user->registered != REG_ALL) || (!IS_LOCAL(user))) return; parameterlist params; @@ -667,21 +667,6 @@ void ModuleSpanningTree::OnUserKick(User* source, Membership* memb, const std::s } } -void ModuleSpanningTree::OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason) -{ - if (!IS_LOCAL(source)) - return; // Only start routing if we're origin. - - ServerInstance->OperQuit.set(dest, operreason); - parameterlist params; - params.push_back(":"+operreason); - Utils->DoOneToMany(dest->uuid,"OPERQUIT",params); - params.clear(); - params.push_back(dest->uuid); - params.push_back(":"+reason); - Utils->DoOneToMany(source->uuid,"KILL",params); -} - void ModuleSpanningTree::OnPreRehash(User* user, const std::string ¶meter) { if (loopCall) @@ -741,7 +726,7 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod) { TreeServer* srv = Utils->TreeRoot->GetChild(x); TreeSocket* sock = srv->GetSocket(); - if (sock && sock->GetIOHook() == mod) + if (sock && sock->GetIOHook() && sock->GetIOHook()->creator == mod) { sock->SendError("SSL module unloaded"); sock->Close();