diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-02 01:32:59 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-02 01:32:59 +0000 |
commit | e6ce64246b2cff2adcb66366727e095afe6ff197 (patch) | |
tree | e327ad404f5eae076edb476fde33f80e3e56268a | |
parent | 858ea80c87d7946cec7d680a48ad326025c70af1 (diff) |
Fix for bug #297. /MODULES now correctly finds remote server on wildcard. Marked for QA.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7206 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index a134d95e1..7aa09ba7a 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -267,17 +267,24 @@ int ModuleSpanningTree::HandleAdmin(const char** parameters, int pcnt, userrec* int ModuleSpanningTree::HandleModules(const char** parameters, int pcnt, userrec* user) { - if (match(ServerInstance->Config->ServerName, parameters[0])) - return 1; + if (pcnt > 0) + { + if (match(ServerInstance->Config->ServerName, parameters[0])) + return 1; - std::deque<std::string> params; - params.push_back(parameters[0]); - TreeServer* s = Utils->FindServerMask(parameters[0]); - if (s) - Utils->DoOneToOne(user->nick, "MODULES", params, s->GetName()); - else - user->WriteServ( "402 %s %s :No such server", user->nick, parameters[0]); - return 1; + std::deque<std::string> params; + params.push_back(parameters[0]); + TreeServer* s = Utils->FindServerMask(parameters[0]); + if (s) + { + params[0] = s->GetName(); + Utils->DoOneToOne(user->nick, "MODULES", params, s->GetName()); + } + else + user->WriteServ( "402 %s %s :No such server", user->nick, parameters[0]); + return 1; + } + return 0; } int ModuleSpanningTree::HandleStats(const char** parameters, int pcnt, userrec* user) |