diff --git a/server/admin_server.lua b/server/admin_server.lua index 43bd9cb7..71c47440 100644 --- a/server/admin_server.lua +++ b/server/admin_server.lua @@ -946,8 +946,30 @@ Citizen.CreateThread(function() updateBan(blacklisted.banid,newBanData) -- send it off! end PrintDebugMessage("Connection of "..getName(player).." Declined, Banned for "..blacklist[bi].reason..", Ban ID: "..blacklist[bi].banid.."\n", 3) - deferrals.done(string.format( GetLocalisedText("bannedjoin"), blacklist[bi].reason, formatDateString(blacklist[bi].expire), blacklist[bi].banid)) + + local banMessageTitleColour = GetConvar("ea_banMessageTitleColour", "#354557") + local banMessageServerName = GetConvar("ea_banMessageServerName", "EasyAdmin") + local banMessageShowStaff = GetConvar("ea_banMessageShowStaff", "true") + local banMessageStaffName = blacklist[bi].banner + local banMessageFooter = GetConvar("ea_banMessageFooter", "You can appeal this by ban by visiting our discord.") + local banMessageSubHeader = GetConvar("ea_banMessageSubHeader", "You have been banned from this server.") + + if banMessageShowStaff == "false" then + banMessageStaffName = 'Server Staff' + end + + local banMessageReason = getStringUntilSuffix(blacklist[bi].reason, ", Banned by:") + -- gives us a raw ban reason with their nickname as we don't want the staff member displayed due to our new convar // "banned by:" field + + deferrals.done( + '
Expires: ' ..
+ formatDateString(blacklist[bi].expire) .. '
Banned By: ' .. banMessageStaffName ..
+ '
Ban Reason: ' .. banMessageReason ..
+ '
Ban ID: ' ..
+ blacklist[bi].banid ..
+ '
' .. banMessageFooter .. '