]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Properly implement notification of no records available
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index 9da86388c1f22936b91de84c88ee9bae265b4b03..9734bcef54507a3f4193f57c892e8193e5f3124c 100644 (file)
@@ -944,12 +944,18 @@ spawnfunc(worldspawn)
        maplist_reply = strzone(getmaplist());
        lsmaps_reply = strzone(getlsmaps());
        monsterlist_reply = strzone(getmonsterlist());
+       bool records_available = false;
        for(int i = 0; i < 10; ++i)
        {
                string s = getrecords(i);
-               if (s)
+               if (s != "")
+               {
                        records_reply[i] = strzone(s);
+                       records_available = true;
+               }
        }
+       if (!records_available)
+               records_reply[0] = "No records available for the current game mode.\n";
        ladder_reply = strzone(getladder());
        rankings_reply = strzone(getrankings());