]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Put back different stats numerics for /stats g, /stats k etc
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 2 Nov 2007 15:22:23 +0000 (15:22 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 2 Nov 2007 15:22:23 +0000 (15:22 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8463 e03df62e-2008-0410-955e-edbf42e46eb7

src/commands/cmd_stats.cpp

index 0e8a5a0b08a3bbe92ba41d5cd0e0b241d2d92ee7..767966caa7c4298b2e7a29cfad3dafcfb6183432 100644 (file)
@@ -47,6 +47,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;
 
        if ((!*ServerInstance->Config->UserStats && !IS_OPER(user)) || (!IS_OPER(user) && !ServerInstance->ULine(user->server) && !strchr(ServerInstance->Config->UserStats,statschar)))
        {
@@ -140,21 +141,20 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                break;
  
                case 'k':
+                       statsnumber = 216;
                case 'g':
+                       statsnumber = 223;
                case 'q':
+                       statsnumber = 217;
                case 'Z':
+                       statsnumber = 223;
                case 'e':
                {
-                       /* FIXME: Make the 216 here different depending on stats char:
-                        * k: 216
-                        * g: 223
-                        * q: 217
-                        * z: 223
-                        * e: 223
-                        */
+                       if (!statsnumber)
+                               statsnumber = 223;
                        std::string stat;
                        stat += toupper(statschar);
-                       ServerInstance->XLines->InvokeStats(stat,216,user,results);
+                       ServerInstance->XLines->InvokeStats(stat,statsnumber,user,results);
                }
                break;