]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
m_spanningtree Move SVSMODE -> MODE translation into the appropiate place, ignore...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index 764c8b8ec87017684743f82d52cafaa22f27f710..9af4bfd0cdfc3ec5f5c4a36f23032f85a96b15c2 100644 (file)
@@ -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 &parameter)
 {
        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();