diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-27 22:54:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-27 22:54:03 +0000 |
commit | 9ade2d89bf8106925ffeb0f26742f0ffa99f028f (patch) | |
tree | 72fa902c81cf2e15fa0b7bf56be69f6869d0db79 | |
parent | e30ca6c388269537295bccabd22aa5d716b9dc46 (diff) |
Tied in client message parser, works very well :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1973 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 0029c6147..724e8da6a 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -607,6 +607,29 @@ class TreeSocket : public InspSocket { return this->IntroduceClient(prefix,params); } + else + { + // not a special inter-server command. + // Emulate the actual user doing the command, + // this saves us having a huge ugly parser. + userrec* who = Srv->FindNick(prefix); + if (who) + { + // its a user + char* strparams[127]; + for (unsigned int q = 0; q < params.size(); q++) + { + strparams[q] = (char*)params[q].c_str(); + } + Srv->CallCommandHandler(command, strparams, params.size(), who); + } + else + { + // its not a user. Its either a server, or somethings screwed up. + log(DEBUG,"Command with unknown origin '%s'",prefix.c_str()); + } + + } return true; break; } |