diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-09 13:06:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-09 13:06:57 +0000 |
commit | 3973b83ca279b9c45467afdf0ebf6091d04e4086 (patch) | |
tree | b33257b436cd55e69ccf04cf0ae69bf943fff978 /src/modules/m_spanningtree.cpp | |
parent | 6637802f216f3687cd5b0f42dcf6fc553299fdb9 (diff) |
*TEST* Oper-Only-Stats (not yet tested)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2749 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 1e597c910..369bda8ef 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2715,9 +2715,9 @@ class ModuleSpanningTree : public Module return 1; } - virtual bool HandleStats(char ** parameters, int pcnt, userrec* user) + virtual int OnStats(char statschar, userrec* user) { - if (*parameters[0] == 'c') + if (statschar == 'c') { for (unsigned int i = 0; i < LinkBlocks.size(); i++) { @@ -2726,9 +2726,9 @@ class ModuleSpanningTree : public Module } WriteServ(user->fd,"219 %s %s :End of /STATS report",user->nick,parameters[0]); WriteOpers("*** Notice: Stats '%s' requested by %s (%s@%s)",parameters[0],user->nick,user->ident,user->host); - return true; + return 1; } - return false; + return 0; } virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated) @@ -2745,10 +2745,6 @@ class ModuleSpanningTree : public Module { return this->HandleSquit(parameters,pcnt,user); } - else if (command == "STATS") - { - return this->HandleStats(parameters,pcnt,user); - } else if (command == "MAP") { this->HandleMap(parameters,pcnt,user); @@ -3219,7 +3215,7 @@ class ModuleSpanningTree : public Module List[I_OnUserQuit] = List[I_OnUserPostNick] = List[I_OnUserKick] = List[I_OnRemoteKill] = List[I_OnRehash] = 1; List[I_OnOper] = List[I_OnAddGLine] = List[I_OnAddZLine] = List[I_OnAddQLine] = List[I_OnAddELine] = 1; List[I_OnDelGLine] = List[I_OnDelZLine] = List[I_OnDelQLine] = List[I_OnDelELine] = List[I_ProtoSendMode] = List[I_OnMode] = 1; - List[I_ProtoSendMetaData] = 1; + List[I_OnStats] = List[I_ProtoSendMetaData] = 1; } }; |