X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fipban.qc;h=d8e055daff87f4df388187395eb3a1b0041e6e57;hp=9d74477b4846525c3d84dc020a58340c75b2e11e;hb=ce80a3d3800ee2f5ce8a8d93ccb6b835a46ec5f6;hpb=d134ce0af0e04817a2a599f8187889d0a7bbc0ee diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 9d74477b4..d8e055daf 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -1,12 +1,12 @@ #include "ipban.qh" -#include -#include -#include "autocvars.qh" -#include "command/banning.qh" -#include "defs.qh" -#include "../common/constants.qh" -#include "../common/util.qh" +#include +#include +#include +#include +#include +#include +#include /* * 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); } });