From 35a58864e4e174ed415e182235ccd497249b1b97 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 13 Apr 2019 12:44:45 -0700 Subject: [PATCH 1/2] add ip/cid to db bans --- code/modules/admin/DB ban/functions.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index dd46725ff26..5eec9d76bdd 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -70,6 +70,11 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = if(banned_mob.client) computerid = banned_mob.client.computer_id ip = banned_mob.client.address + else + if(banned_mob.lastKnownIP) + ip = banned_mob.lastKnownIP + if(banned_mob.computer_id) + computerid = banned_mob.computer_id else if(banckey) ckey = ckey(banckey) computerid = bancid From 2726324dfab5237c58a57e0a4049bff4044ba083 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 13 Apr 2019 12:51:34 -0700 Subject: [PATCH 2/2] removes non-IP ban option for legacy bans, because DB bans won't honor it regardless --- code/modules/admin/topic.dm | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 17d3cae9d5c..c2b6a388ca1 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1005,15 +1005,7 @@ var/reason = input(usr,"Please state the reason","Reason") as message|null if(!reason) return - switch(alert(usr,"IP ban?",,"Yes","No","Cancel")) - if("Cancel") - return - if("Yes") - M = admin_ban_mobsearch(M, ban_ckey_param, usr) - AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP) - if("No") - M = admin_ban_mobsearch(M, ban_ckey_param, usr) - AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0) + AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP) to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") to_chat(M, "This is a permanent ban.") if(config.banappeals) @@ -1553,12 +1545,12 @@ else if(href_list["take_question"]) var/index = text2num(href_list["take_question"]) - + if(href_list["is_mhelp"]) SSmentor_tickets.takeTicket(index) else //Ahelp SStickets.takeTicket(index) - + else if(href_list["cult_nextobj"]) if(alert(usr, "Validate the current Cult objective and unlock the next one?", "Cult Cheat Code", "Yes", "No") != "Yes") return