From 17f5b23b8d535e3c2f4fec411f4681a3daf29374 Mon Sep 17 00:00:00 2001 From: James Cole <61920219+coleminer0112@users.noreply.github.com> Date: Thu, 18 Nov 2021 17:17:35 +0100 Subject: [PATCH] Add Ban ID to webhook notification for easier appeal work --- admin_server.lua | 2 +- language/cs.json | 2 +- language/de.json | 2 +- language/en.json | 2 +- language/es.json | 2 +- language/fr.json | 2 +- language/it.json | 2 +- language/nl.json | 2 +- language/pl.json | 2 +- language/pt.json | 2 +- language/sv.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/admin_server.lua b/admin_server.lua index 806a1b1a..b8d612aa 100644 --- a/admin_server.lua +++ b/admin_server.lua @@ -759,7 +759,7 @@ Citizen.CreateThread(function() local ban = {banid = GetFreshBanId(), name = username,identifiers = bannedIdentifiers, banner = getName(source, true), reason = reason, expire = expires } updateBlacklist( ban ) PrintDebugMessage("Player "..getName(source,true).." banned player "..CachedPlayers[playerId].name.." for "..reason, 3) - SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminbannedplayer"), getName(source, false, true), CachedPlayers[playerId].name, reason, formatDateString( expires ) ), "ban", 16711680) + SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminbannedplayer"), getName(source, false, true), CachedPlayers[playerId].name, reason, formatDateString( expires ), tostring(ban.banid) ), "ban", 16711680) DropPlayer(playerId, string.format(GetLocalisedText("banned"), reason, formatDateString( expires ) ) ) elseif CachedPlayers[playerId].immune then TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune")) diff --git a/language/cs.json b/language/cs.json index 1a77aa07..defe0390 100644 --- a/language/cs.json +++ b/language/cs.json @@ -91,7 +91,7 @@ "playernotfound": "Hrac nemohl byt nalezen.", "done": "Hotovo!", "adminkickedplayer": "**%s** vyhodil **%s**, Duvod: %s", - "adminbannedplayer": "**%s** zabanoval **%s**, Duvod: %s, Ban vyprsi: %s", + "adminbannedplayer": "**%s** zabanoval **%s**, Duvod: %s, Ban vyprsi: %s, ID: %s", "adminunbannedplayer": "**%s** odbanoval **%s** [ %s ]", "adminslappedplayer": "**%s** profackoval **%s** za **%s HP**", diff --git a/language/de.json b/language/de.json index 849dbe16..7ac922c8 100644 --- a/language/de.json +++ b/language/de.json @@ -94,7 +94,7 @@ "playernotfound": "Spieler wurde nicht gefunden.", "done": "Fertig!", "adminkickedplayer": "**%s** hat **%s** gekickt, Grund: %s", - "adminbannedplayer": "**%s** hat **%s** gebannt, Grund: %s, Bann entfällt: %s", + "adminbannedplayer": "**%s** hat **%s** gebannt, Grund: %s, Bann entfällt: %s, ID: %s", "adminunbannedplayer": "**%s** hat **%s** entbannt. [ %s ]", "adminslappedplayer": "**%s** hat **%s** geschlagen **(%s Leben)**.", diff --git a/language/en.json b/language/en.json index 8ef5bd21..3d779a11 100644 --- a/language/en.json +++ b/language/en.json @@ -93,7 +93,7 @@ "playernotfound": "Player could not be found.", "done": "Done!", "adminkickedplayer": "**%s** kicked **%s**, Reason: %s", - "adminbannedplayer": "**%s** banned **%s**, Reason: %s, Ban Expires: %s", + "adminbannedplayer": "**%s** banned **%s**, Reason: %s, Ban Expires: %s, ID: %s", "adminunbannedplayer": "**%s** unbanned **%s** [ %s ]", "adminslappedplayer": "**%s** slapped **%s** for **%s HP**", diff --git a/language/es.json b/language/es.json index f8d4625e..06f85aed 100644 --- a/language/es.json +++ b/language/es.json @@ -93,7 +93,7 @@ "playernotfound": "No se ha encontrado al jugador.", "done": "Hecho", "adminkickedplayer": "**%s** a kickeado a **%s**, Razón: %s", - "adminbannedplayer": "**%s** a baneado a **%s**, Razón: %s, Expira: %s", + "adminbannedplayer": "**%s** a baneado a **%s**, Razón: %s, Expira: %s, ID: %s", "adminunbannedplayer": "**%s** a desbaneado a **%s** [ %s ]", "adminslappedplayer": "**%s** a abofeteado a **%s** por **%s HP**", diff --git a/language/fr.json b/language/fr.json index 800e48f6..6db8fa8a 100644 --- a/language/fr.json +++ b/language/fr.json @@ -94,7 +94,7 @@ "playernotfound": "Le joueur n'a pas été trouvé.", "done": "Fait!", "adminkickedplayer": "**%s** a expulser **%s**, Raison: %s", - "adminbannedplayer": "**%s** a banni **%s**, Raison: %s, Expire: %s", + "adminbannedplayer": "**%s** a banni **%s**, Raison: %s, Expire: %s, ID: %s", "adminunbannedplayer": "**%s** a débanni **%s** [ %s ]", "adminslappedplayer": "**%s** à pousser **%s** pour **%s HP**", diff --git a/language/it.json b/language/it.json index aa5e1ca4..a61ea6e1 100644 --- a/language/it.json +++ b/language/it.json @@ -95,7 +95,7 @@ "playernotfound": "Giocatore non trovato.", "done": "Fatto!", "adminkickedplayer": "**%s** Ha espulso **%s**, Motivo: %s", - "adminbannedplayer": "**%s** Ha bandito **%s**, Motivo: %s, Scadenza: %s", + "adminbannedplayer": "**%s** Ha bandito **%s**, Motivo: %s, Scadenza: %s, ID: %s", "adminunbannedplayer": "**%s** ha revocato il ban di **%s** [ %s ]", "adminslappedplayer": "**%s** ha schiaffeggiato **%s** togliendogli **%s HP**", diff --git a/language/nl.json b/language/nl.json index 0fc7ddcf..dcf3f268 100644 --- a/language/nl.json +++ b/language/nl.json @@ -96,7 +96,7 @@ "done": "Gedaan!", "adminkickedplayer": "**%s** Gekickt **%s**, Reden: %s", - "adminbannedplayer": "**%s** banned **%s**, Reden: %s, Ban Vervalt: %s", + "adminbannedplayer": "**%s** banned **%s**, Reden: %s, Ban Vervalt: %s, ID: %s", "adminunbannedplayer": "**%s** Ban ongedaan gemaakt **%s** [ %s ]", "adminslappedplayer": "**%s** sloeg **%s** for **%s HP**", "adminfrozeplayer": "**%s** bevroor **%s**.", diff --git a/language/pl.json b/language/pl.json index 3cf4ffbf..8c640d9a 100644 --- a/language/pl.json +++ b/language/pl.json @@ -93,7 +93,7 @@ "playernotfound": "Nie można znaleźć gracza.", "done": "Zrobione!", "adminkickedplayer": "**%s** wyrzucił **%s**, Powód: %s", - "adminbannedplayer": "**%s** zbanował **%s**, Powód: %s, Czas trwania: %s", + "adminbannedplayer": "**%s** zbanował **%s**, Powód: %s, Czas trwania: %s, ID: %s", "adminunbannedplayer": "**%s** odblokował **%s** [ %s ]", "adminslappedplayer": "**%s** uderzył **%s** za **%s HP**", diff --git a/language/pt.json b/language/pt.json index 683b485d..b781bbd3 100644 --- a/language/pt.json +++ b/language/pt.json @@ -92,7 +92,7 @@ "playernotfound": "Jogador não pode ser encontrado.", "done": "Feito!", "adminkickedplayer": "**%s** kicked **%s**, Razão: %s", - "adminbannedplayer": "**%s** banido **%s**, Razão: %s, Ban Expira: %s", + "adminbannedplayer": "**%s** banido **%s**, Razão: %s, Ban Expira: %s, ID: %s", "adminunbannedplayer": "**%s** unbanned **%s** [ %s ]", "adminslappedplayer": "**%s** slapped **%s** for **%s HP**", "adminfrozeplayer": "**%s** froze **%s**.", diff --git a/language/sv.json b/language/sv.json index 5aae094c..124876ab 100644 --- a/language/sv.json +++ b/language/sv.json @@ -94,7 +94,7 @@ "playernotfound": "Spelaren kunde inte hittas.", "done": "Klart!", "adminkickedplayer": "**%s** kickad **%s**, Anledning: %s", - "adminbannedplayer": "**%s** bannlyste **%s**, Anledning: %s, löper ut: %s", + "adminbannedplayer": "**%s** bannlyste **%s**, Anledning: %s, löper ut: %s, ID: %s", "adminunbannedplayer": "**%s** hävde bannlysning **%s** [ %s ]", "adminslappedplayer": "**%s** slog **%s** för **%s HP**",