From 9ade2d89bf8106925ffeb0f26742f0ffa99f028f Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 27 Nov 2005 22:54:03 +0000 Subject: [PATCH] Tied in client message parser, works very well :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1973 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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; } -- 2.39.5