]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Block anonymous records from the CTS leaderboard
authorMario <mario@smbclan.net>
Wed, 18 Jan 2017 06:43:34 +0000 (16:43 +1000)
committerMario <mario@smbclan.net>
Wed, 18 Jan 2017 06:43:34 +0000 (16:43 +1000)
.gitlab-ci.yml
notifications.cfg
qcsrc/common/notifications/all.inc
qcsrc/server/race.qc

index 1488aef2b5519793039bed93e0331976be5c3063..9e42b44c4058347b3756174459204ca77c21e18f 100644 (file)
@@ -30,7 +30,7 @@ test_sv_game:
     - wget -O data/maps/g-23.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.cache
     - wget -O data/maps/g-23.waypoints.hardwired https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/g-23.waypoints.hardwired
     - make
-    - EXPECT=49ace70f31418e5580127461d853fcef
+    - EXPECT=86720b1d38512b4e92183d30662bab41
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 3e6b009d0ace2459a613dc3fdb2b8550c5c74448..feb9b871b0d9170ac4356bcec4480fc3212f3bf7 100644 (file)
@@ -102,7 +102,7 @@ seta notification_ANNCE_VOTE_ACCEPT "2" "0 = disabled, 1 = enabled if gentle mod
 seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
 seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
 
-// MSG_INFO notifications (count = 328):
+// MSG_INFO notifications (count = 329):
 seta notification_INFO_CA_JOIN_LATE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CA_LEAVE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -269,6 +269,7 @@ seta notification_INFO_RACE_FAIL_UNRANKED "1" "0 = off, 1 = print to console, 2
 seta notification_INFO_RACE_FINISHED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_RACE_NEW_BROKEN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_RACE_NEW_IMPROVED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_RACE_NEW_MISSING_NAME "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_RACE_NEW_MISSING_UID "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_RACE_NEW_SET "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_ROUND_OVER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -743,4 +744,4 @@ seta notification_show_sprees_info "3" "Show spree information in MSG_INFO messa
 seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
 seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
 
-// Notification counts (total = 833): MSG_ANNCE = 89, MSG_INFO = 328, MSG_CENTER = 235, MSG_MULTI = 153, MSG_CHOICE = 28
+// Notification counts (total = 834): MSG_ANNCE = 89, MSG_INFO = 329, MSG_CENTER = 235, MSG_MULTI = 153, MSG_CHOICE = 28
index c25c19443c73b5cb4d2e58b4d76c784b0e9869c0..fa7112e55cad164a45939425683293eb94495b5b 100644 (file)
     MSG_INFO_NOTIF(RACE_NEW_BROKEN,                         1,  2, 3, "s1 s2 race_col f1ord race_col f2race_time race_diff",  "s1 f2race_time",     "race_newrankyellow",       _("^BG%s^BG broke %s^BG's %s%s^BG place record with %s%s %s"), "")
     MSG_INFO_NOTIF(RACE_NEW_IMPROVED,                       1,  1, 3, "s1 race_col f1ord race_col f2race_time race_diff", "s1 f2race_time",         "race_newtime",             _("^BG%s^BG improved their %s%s^BG place record with %s%s %s"), "")
     MSG_INFO_NOTIF(RACE_NEW_MISSING_UID,                    1,  1, 1, "s1 f1race_time", "s1 f1race_time",                                           "race_newfail",             _("^BG%s^BG scored a new record with ^F2%s^BG, but unfortunately lacks a UID and will be lost."), "")
+    MSG_INFO_NOTIF(RACE_NEW_MISSING_NAME,                   1,  1, 1, "s1 f1race_time", "s1 f1race_time",                                           "race_newfail",             _("^BG%s^BG scored a new record with ^F2%s^BG, but is anonymous and will be lost."), "")
     MSG_INFO_NOTIF(RACE_NEW_SET,                            1,  1, 2, "s1 race_col f1ord race_col f2race_time", "s1 f2race_time",                   "race_newrecordserver",     _("^BG%s^BG set the %s%s^BG place record with %s%s"), "")
 
     MULTIICON_INFO(MINIGAME_INVITE,                         1,  2, 0, "s2 minigame1_name s1", "s2", "minigame1_d", "minigames/%s/icon_notif",   _("^F4You have been invited by ^BG%s^F4 to join their game of ^F2%s^F4 (^F1%s^F4)"), "")
index a3cbc685f2be9d3164ce3526d7932a9f962b7a54..a90ef8f95f8d74bb1fa9442051a1b6b908e31e9a 100644 (file)
@@ -285,6 +285,12 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
                return;
        }
 
+       if(uid2name(myuid) == "^1Unregistered Player")
+       {
+               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_RACE_NEW_MISSING_NAME, mynetname, t);
+               return;
+       }
+
        oldrec = race_readTime(GetMapname(), newpos);
        oldrec_holder = race_readName(GetMapname(), newpos);