diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-24 23:01:52 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-24 23:01:52 +0000 |
commit | 16a963e19f65aa6d69025a82d20254aa72d48c02 (patch) | |
tree | 2e994db4ac5fa3e5e93e3fccf4df97131aecc296 /src/modules/m_spanningtree | |
parent | db6ee71db2c96b243c564f422c490a87f9ba5d00 (diff) |
Test stuff to fix remote stats brokage
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6710 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 4fa165d10..60d332c57 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -241,19 +241,31 @@ int ModuleSpanningTree::HandleStats(const char** parameters, int pcnt, userrec* { if (pcnt > 1) { + ServerInstance->Log(DEBUG,"Match %s against %s", ServerInstance->Config->ServerName, parameters[1]); + if (match(ServerInstance->Config->ServerName, parameters[1])) + { + ServerInstance->Log(DEBUG,"Matched %s against %s", ServerInstance->Config->ServerName, parameters[1]); + return 0; + } + /* Remote STATS, the server is within the 2nd parameter */ std::deque<std::string> params; params.push_back(parameters[0]); params.push_back(parameters[1]); /* Send it out remotely, generate no reply yet */ + TreeServer* s = Utils->FindServerMask(parameters[1]); if (s) { + ServerInstance->Log(DEBUG,"Found %s", s->GetName().c_str()); + params[1] = s->GetName(); Utils->DoOneToOne(user->nick, "STATS", params, s->GetName()); } else - user->WriteServ( "402 %s %s :No such server", user->nick, parameters[0]); + { + user->WriteServ( "402 %s %s :No such server", user->nick, parameters[1]); + } return 1; } return 0; |