X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fipban.qc;h=b9ad08873ee005a5be54b9413a4adda6062fcb13;hb=480de525d9378ac5baa42568c212dc6b13363879;hp=9d74477b4846525c3d84dc020a58340c75b2e11e;hpb=0d0a2025de767dbfae0519941294f5947fe38c1f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 9d74477b4..b9ad08873 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -1,12 +1,11 @@ #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 /* * Protocol of online ban list: @@ -453,11 +452,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 +493,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); } });