]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ipban.qc
Bans: Do not print IP of banned clients. Add crypto_idfp to log format.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ipban.qc
index 9d74477b4846525c3d84dc020a58340c75b2e11e..a7786f6b660eac467b1d7ea689dfb0f4dac98f92 100644 (file)
@@ -453,11 +453,16 @@ bool Ban_MaybeEnforceBan(entity client)
 {
        if (Ban_IsClientBanned(client, -1))
        {
-               string s = sprintf("^1NOTE:^7 banned client %s just tried to enter\n", client.netaddress);
+               if (!client.crypto_idfp)
+                       LOG_INFOF("^1NOTE:^7 banned client %s just tried to enter\n",
+                               client.netaddress);
+               else
+                       LOG_INFOF("^1NOTE:^7 banned client %s (%s) just tried to enter\n",
+                               client.netaddress, client.crypto_idfp);
+
                if(autocvar_g_ban_telluser)
                        sprint(client, "You are banned from this server.\n");
                dropclient(client);
-               bprint(s);
                return true;
        }
        return false;
@@ -489,7 +494,7 @@ string Ban_Enforce(float j, string reason)
                                        reason = strcat(reason, ", ");
                                reason = strcat(reason, it.netname);
                        }
-                       s = strcat(s, "^1NOTE:^7 banned client ", it.netaddress, "^7 has to go\n");
+                       s = strcat(s, "^1NOTE:^7 banned client ", it.netname, "^7 has to go\n");
                        dropclient(it);
                }
        });