diff options
Diffstat (limited to 'src/modules/m_spanningtree/encap.cpp')
-rw-r--r-- | src/modules/m_spanningtree/encap.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/encap.cpp b/src/modules/m_spanningtree/encap.cpp index c56f8dc74..7b85a49d0 100644 --- a/src/modules/m_spanningtree/encap.cpp +++ b/src/modules/m_spanningtree/encap.cpp @@ -22,15 +22,20 @@ -/** remote MOTD. leet, huh? */ +/** ENCAP */ bool TreeSocket::Encap(const std::string &prefix, parameterlist ¶ms) { if (params.size() > 1) { if (InspIRCd::Match(ServerInstance->Config->GetSID(), params[0])) { - Event event((char*) ¶ms, (Module*)this->Utils->Creator, "encap_received"); - event.Send(ServerInstance); + User* who = this->ServerInstance->FindUUID(prefix); + if (!who) + who = Utils->ServerUser; + + parameterlist plist(params.begin() + 2, params.end()); + ServerInstance->CallCommandHandler(params[1].c_str(), plist, who); + // discard return value, ENCAP shall succeed even if the command does not exist } params[params.size() - 1] = ":" + params[params.size() - 1]; |