Prevent ban spam

This commit is contained in:
Jackz 2022-07-12 22:19:38 -05:00
parent 10a6a750e3
commit 0cd8ccf6f7
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
2 changed files with 17 additions and 12 deletions

Binary file not shown.

View file

@ -44,6 +44,8 @@ enum struct PlayerData {
bool underAttack;
int immunityFlags;
bool pendingAction;
}
PlayerData pData[MAXPLAYERS+1];
@ -364,6 +366,7 @@ public Action Event_OnTakeDamage(int victim, int& attacker, int& inflictor, flo
diffJoinMin,
lastFFMin
);
if(!pData[attacker].pendingAction) {
if(hTKAction.IntValue == 1) {
LogMessage("[TKStopper] Kicking %N for excessive FF (%.2f HP)", attacker, pData[attacker].TKDamageBuffer);
NotifyAllAdmins("[Notice] Kicking %N for excessive FF (%.2f HP)", attacker, pData[attacker].TKDamageBuffer);
@ -377,6 +380,8 @@ public Action Event_OnTakeDamage(int victim, int& attacker, int& inflictor, flo
NotifyAllAdmins("[Notice] %N will be banned for FF on disconnect (%.2f HP) for %d minutes. Use \"/ignore <player> tk\" to make them immune.", attacker, pData[attacker].TKDamageBuffer, hBanTime.IntValue);
pData[attacker].isTroll = true;
}
pData[attacker].pendingAction = true;
}
damage = 0.0;
return Plugin_Handled;
}