diff options
Diffstat (limited to 'src/modules/m_spanningtree/encap.cpp')
-rw-r--r-- | src/modules/m_spanningtree/encap.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/encap.cpp b/src/modules/m_spanningtree/encap.cpp index 95f8f4e4a..8059d2a39 100644 --- a/src/modules/m_spanningtree/encap.cpp +++ b/src/modules/m_spanningtree/encap.cpp @@ -20,6 +20,7 @@ #include "inspircd.h" #include "commands.h" +#include "main.h" /** ENCAP */ CmdResult CommandEncap::Handle(User* user, std::vector<std::string>& params) @@ -27,6 +28,16 @@ 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()); + + // XXX: Workaround for SVS* commands provided by spanningtree not being registered in the core + if ((params[1] == "SVSNICK") || (params[1] == "SVSJOIN") || (params[1] == "SVSPART")) + { + ServerCommand* const scmd = Utils->Creator->CmdManager.GetHandler(params[1]); + if (scmd) + scmd->Handle(user, plist); + return CMD_SUCCESS; + } + Command* cmd = NULL; ServerInstance->Parser.CallHandler(params[1], plist, user, &cmd); // Discard return value, ENCAP shall succeed even if the command does not exist |