From 77987f76f5aa1eb57a36b64a3420b5a3b47fdd6b Mon Sep 17 00:00:00 2001 From: Miniature Date: Sat, 12 May 2012 00:48:17 +0930 Subject: [PATCH] Made banned people who aren't banned under the same key they are trying to log in as show what key they were banned as to admins turned on the thing to show where to go to appeal --- code/modules/admin/NewBan.dm | 28 ++++++++++++++++++++++++---- code/modules/mob/mob.dm | 6 +----- config/config.txt | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index 2c5ec0cf011..beafeff0a5c 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -36,10 +36,16 @@ var/savefile/Banlist ClearTempbans() return 0 else - return "[Banlist["reason"]]\n(This ban will be automatically removed in [GetBanExp(Banlist["minutes"])].)" + log_access("Failed Login: [clientvar] - Banned") + message_admins("\blue Failed Login: [clientvar] - Banned") + alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This ban will be automatically removed in [GetBanExp(Banlist["minutes"])].)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") + return 1 else Banlist.cd = "/base/[key][id]" - return "[Banlist["reason"]]\n(This is a permanent ban)" + log_access("Failed Login: [clientvar] - Banned") + message_admins("\blue Failed Login: [clientvar] - Banned") + alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This is a permanent ban.)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") + return 1 Banlist.cd = "/base" for (var/A in Banlist.dir) @@ -50,9 +56,23 @@ var/savefile/Banlist ClearTempbans() return 0 else - return "[Banlist["reason"]]\n(This ban will be automatically removed in [GetBanExp(Banlist["minutes"])].)" + if(key != Banlist["key"]) + log_access("Failed Login: [clientvar] - Banned as [Banlist["key"]]") + message_admins("\blue Failed Login: [clientvar] - Banned as [Banlist["key"]]") + else + log_access("Failed Login: [clientvar] - Banned") + message_admins("\blue Failed Login: [clientvar] - Banned") + alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This ban will be automatically removed in [GetBanExp(Banlist["minutes"])].)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") + return 1 else - return "[Banlist["reason"]]\n(This is a permanent ban)" + if(key != Banlist["key"]) + log_access("Failed Login: [clientvar] - Banned as [Banlist["key"]]") + message_admins("\blue Failed Login: [clientvar] - Banned as [Banlist["key"]]") + else + log_access("Failed Login: [clientvar] - Banned") + message_admins("\blue Failed Login: [clientvar] - Banned") + alert(clientvar,"You have been banned.\nReason : [Banlist["reason"]]\n(This is a permanent ban.)[config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") + return 1 return 0 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f3355dba7f7..75320d7e440 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -783,11 +783,7 @@ if(findtextEx(key, "Telnet @")) src << "Sorry, this game does not support Telnet." del(src) - var/isbanned = CheckBan(src) - if (isbanned) - log_access("Failed Login: [src] - Banned") - message_admins("\blue Failed Login: [src] - Banned") - alert(src,"You have been banned.\nReason : [isbanned][config.appeal_address ? "\nYou may try to appeal this at [config.appeal_address]" : ""]","Ban","Ok") + if (CheckBan(src)) del(src) /* diff --git a/config/config.txt b/config/config.txt index c5c4c3fc147..d49f20e252b 100644 --- a/config/config.txt +++ b/config/config.txt @@ -144,4 +144,4 @@ GUEST_JOBBAN 1 #POPUP_ADMIN_PM ##What address should banned people appeal ther ban at? Remember to escape the characters, if needed! -# APPEAL_ADDRESS -->APPEAL ADDRESS HERE<-- \ No newline at end of file +APPEAL_ADDRESS http://baystation12.net/forums/index.php/board,2.0.html \ No newline at end of file