]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/postcommand.cpp
Fix ENCAP stripping, was incorrectly checking for " CHGHOST" and similar commands
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / postcommand.cpp
index d8cb5081dc55bc2a4cf22e7740ea09ffe263ba18..63a8d76c38972cbc1bf036fe406fb4642f7618b0 100644 (file)
@@ -24,7 +24,7 @@
 
 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
 
-void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, CmdResult result, const std::string &original_line)
+void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, LocalUser *user, CmdResult result, const std::string &original_line)
 {
        if (result == CMD_SUCCESS)
                Utils->RouteCommand(NULL, command, parameters, user);
@@ -66,7 +66,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
                TreeServer* sdest = FindServer(routing.serverdest);
                if (!sdest)
                {
-                       ServerInstance->Logs->Log("m_spanningtree",ERROR,"Trying to route ENCAP to nonexistant server %s",
+                       ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Trying to route ENCAP to nonexistant server %s",
                                routing.serverdest.c_str());
                        return;
                }
@@ -79,9 +79,9 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
                Module* srcmodule = thiscmd->creator;
                Version ver = srcmodule->GetVersion();
 
-               if (!(ver.Flags & (VF_COMMON | VF_CORE)))
+               if (!(ver.Flags & (VF_COMMON | VF_CORE)) && srcmodule != Creator)
                {
-                       ServerInstance->Logs->Log("m_spanningtree",ERROR,"Routed command %s from non-VF_COMMON module %s",
+                       ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Routed command %s from non-VF_COMMON module %s",
                                command.c_str(), srcmodule->ModuleSourceFile.c_str());
                        return;
                }