]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix records reply
authorSamual <samual@xonotic.org>
Tue, 17 Apr 2012 17:32:17 +0000 (13:32 -0400)
committerSamual <samual@xonotic.org>
Tue, 17 Apr 2012 17:32:17 +0000 (13:32 -0400)
qcsrc/server/command/common.qc
qcsrc/server/command/getreplies.qc

index 7bda0e0569e321f72376c7bc3c8e3cb8b8cc11dc..99313b38bf4f9e3b2331fcc5a6d75fb09622b6b4 100644 (file)
@@ -433,7 +433,7 @@ void CommonCommand_records(float request, entity caller)
                        float i;
                        
                        for(i = 0; i < 10; ++i)
-                               if(records_reply[i])
+                               if(records_reply[i] != "")
                                        print_to(caller, records_reply[i]);
                                
                        return; // never fall through to usage
index 3640c817283545f2ca27058cce0bfc840f54beba..be4928e8a76296568f1aa21ab2d7270f9ec42d0b 100644 (file)
@@ -23,7 +23,7 @@ string getrecords(float page) // 50 records per page
                        {
                                r = stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/time")));
                                
-                               if (r == 0)
+                               if not(r)
                                        continue;
                                        
                                // TODO: uid2name
@@ -42,7 +42,7 @@ string getrecords(float page) // 50 records per page
                        {
                                r = race_readTime(MapInfo_Map_bspname, 1);
                                
-                               if (r == 0)
+                               if not(r)
                                        continue;
                                        
                                h = race_readName(MapInfo_Map_bspname, 1);
@@ -60,7 +60,7 @@ string getrecords(float page) // 50 records per page
                        {
                                r = race_readTime(MapInfo_Map_bspname, 1);
                                
-                               if (r == 0)
+                               if not(r)
                                        continue;
                                        
                                h = race_readName(MapInfo_Map_bspname, 1);
@@ -72,7 +72,7 @@ string getrecords(float page) // 50 records per page
 
        MapInfo_ClearTemps();
 
-       if (s == "" && page == 0)
+       if(s == "" && page == 0)
                return "No records are available on this server.\n";
        else
                return s;