]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/views/submission.py
Honor cl_allow_uid2name 0 when cl_allow_uidtracking is 1.
[xonotic/xonstat.git] / xonstat / views / submission.py
index d043fe3623d6f8e272a5a2cf7d2884684b4b0299..6d5bd5a02fa371f5106b9aa014bd944b29cf4519 100755 (executable)
@@ -389,17 +389,14 @@ def create_player_game_stat(session=None, player=None,
         if key == 'scoreboard-kills': pgstat.kills = value\r
         if key == 'scoreboard-suicides': pgstat.suicides = value\r
 \r
-    # check to see if we had a name, and if \r
-    # not use the name from the player id\r
+    # check to see if we had a name, and if\r
+    # not use an anonymous handle\r
     if pgstat.nick == None:\r
-        pgstat.nick = player.nick\r
+        pgstat.nick = "Anonymous Player"\r
+        pgstat.stripped_nick = "Anonymous Player"\r
 \r
-    # whichever nick we ended up with, strip it and store as the stripped_nick\r
-    pgstat.stripped_nick = qfont_decode(strip_colors(pgstat.nick))\r
-\r
-    # if the nick we end up with is different from the one in the\r
-    # player record, change the nick to reflect the new value\r
-    if pgstat.nick != player.nick and player.player_id > 2:\r
+    # otherwise process a nick change\r
+    elif pgstat.nick != player.nick and player.player_id > 2:\r
         register_new_nick(session, player, pgstat.nick)\r
 \r
     # if the player is ranked #1 and it is a team game, set the game's winner\r