diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-02 20:30:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-02 20:30:55 +0000 |
commit | dccee96be21199ab2fe2a6d53dce025d016ced52 (patch) | |
tree | f09d8f874ac019a53d3f596949973b4a9ada1709 | |
parent | 4085aeb86f90cef4c566e23b2a00a1430bb0feaf (diff) |
I must have been smoking craq, this would never have worked
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8470 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/commands/cmd_stats.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 767966caa..74658a149 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -46,8 +46,7 @@ CmdResult CommandStats::Handle (const char** parameters, int /* pcnt */, User *u DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, string_list &results) { - std::string sn = ServerInstance->Config->ServerName; - int statsnumber = 0; + std::string sn(ServerInstance->Config->ServerName); if ((!*ServerInstance->Config->UserStats && !IS_OPER(user)) || (!IS_OPER(user) && !ServerInstance->ULine(user->server) && !strchr(ServerInstance->Config->UserStats,statschar))) { @@ -141,21 +140,19 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str break; case 'k': - statsnumber = 216; + ServerInstance->XLines->InvokeStats("K",216,user,results); + break; case 'g': - statsnumber = 223; + ServerInstance->XLines->InvokeStats("G",223,user,results); + break; case 'q': - statsnumber = 217; + ServerInstance->XLines->InvokeStats("Q",217,user,results); + break; case 'Z': - statsnumber = 223; + ServerInstance->XLines->InvokeStats("Z",223,user,results); + break; case 'e': - { - if (!statsnumber) - statsnumber = 223; - std::string stat; - stat += toupper(statschar); - ServerInstance->XLines->InvokeStats(stat,statsnumber,user,results); - } + ServerInstance->XLines->InvokeStats("E",223,user,results); break; /* stats m (list number of times each command has been used, plus bytecount) */ |