]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ipban.qc
Merge branch 'master' into terencehill/glowmod_color_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ipban.qc
index 9d74477b4846525c3d84dc020a58340c75b2e11e..d8e055daff87f4df388187395eb3a1b0041e6e57 100644 (file)
@@ -1,12 +1,12 @@
 #include "ipban.qh"
 
-#include <server/defs.qh>
-#include <server/miscfunctions.qh>
-#include "autocvars.qh"
-#include "command/banning.qh"
-#include "defs.qh"
-#include "../common/constants.qh"
-#include "../common/util.qh"
+#include <common/constants.qh>
+#include <common/stats.qh>
+#include <common/util.qh>
+#include <common/weapons/_all.qh>
+#include <server/autocvars.qh>
+#include <server/command/banning.qh>
+#include <server/main.qh>
 
 /*
  * Protocol of online ban list:
@@ -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);
                }
        });