diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-11 18:14:44 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-11 18:14:44 +0000 |
commit | c268dfbc1bd995d20c61c407565a0f3402ca2c01 (patch) | |
tree | d1b5469c2e21566c448de56bf0c6a3bcfed4f47c | |
parent | 48caa6ad48ea6741c396794f643bc6b14e8031a9 (diff) |
Added handler for TIME with server parameter
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3161 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 45afa71df..4e45e6dd1 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2801,6 +2801,26 @@ class ModuleSpanningTree : public Module return 1; } + int HandleTime(char** parameters, int pcnt, userrec* user) + { + if ((user->fd > -1) && (pcnt)) + { + TreeServer* found = FindServerMask(parameters[0]); + if (found) + { + std::deque<std::string> params; + params.push_back(found->GetName()); + params.push_back(user->nick); + DoOneToOne(Srv->GetServerName(),"TIME",params,found->GetName()); + } + else + { + WriteServ(user->fd,"402 %s %s :No such server",user->nick,parameters[0]); + } + } + return 1; + } + int HandleRemoteWhois(char** parameters, int pcnt, userrec* user) { if ((user->fd > -1) && (pcnt > 1)) @@ -2983,6 +3003,10 @@ class ModuleSpanningTree : public Module this->HandleMap(parameters,pcnt,user); return 1; } + else if ((command == "TIME") && (pcnt > 0)) + { + return this->HandleTime(parameters,pcnt,user); + } else if (command == "LUSERS") { this->HandleLusers(parameters,pcnt,user); |