]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/encap.cpp
m_spanningtree Throw an exception on protocol violations instead of returning CMD_INVALID
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / encap.cpp
index 12ab2b664cf939b43019a07315ee2e0c77c34073..566f15da88d0298ee49c1b2bceda14b7ea7603ee 100644 (file)
@@ -27,8 +27,12 @@ CmdResult CommandEncap::Handle(User* user, std::vector<std::string>& params)
        if (ServerInstance->Config->GetSID() == params[0] || InspIRCd::Match(ServerInstance->Config->ServerName, params[0]))
        {
                parameterlist plist(params.begin() + 2, params.end());
-               ServerInstance->Parser->CallHandler(params[1], plist, user);
+               Command* cmd = NULL;
+               ServerInstance->Parser->CallHandler(params[1], plist, user, &cmd);
                // Discard return value, ENCAP shall succeed even if the command does not exist
+
+               if ((cmd) && (cmd->force_manual_route))
+                       return CMD_FAILURE;
        }
        return CMD_SUCCESS;
 }