From 633a8bcfa58fd5c3905a958cc4254c4595106436 Mon Sep 17 00:00:00 2001
From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Date: Fri, 3 Sep 2021 13:16:49 +0100
Subject: [PATCH] Removes bay-era warning system
---
code/modules/admin/admin.dm | 1 -
code/modules/admin/admin_verbs.dm | 45 -------------------
code/modules/admin/topic.dm | 3 --
code/modules/client/preference/preferences.dm | 1 -
4 files changed, 50 deletions(-)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 85d4be92516..5995e44a40c 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -122,7 +122,6 @@ GLOBAL_VAR_INIT(nologevent, 0)
if(M.ckey)
body += "Kick | "
- body += "Warn | "
body += "Ban | "
body += "Jobban | "
body += "Appearance Ban | "
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index de44ccd4788..5ddf090f101 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -492,51 +492,6 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
log_admin("[key_name(usr)] has turned BB mode [holder.fakekey ? "ON" : "OFF"]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Big Brother Mode")
-#define MAX_WARNS 3
-#define AUTOBANTIME 10
-
-/client/proc/warn(warned_ckey)
- if(!check_rights(R_ADMIN))
- return
-
- if(!warned_ckey || !istext(warned_ckey)) return
- if(warned_ckey in GLOB.admin_datums)
- to_chat(usr, "Error: warn(): You can't warn admins.")
- return
-
- var/datum/preferences/D
- var/client/C = GLOB.directory[warned_ckey]
- if(C) D = C.prefs
- else D = GLOB.preferences_datums[warned_ckey]
-
- if(!D)
- to_chat(src, "Error: warn(): No such ckey found.")
- return
-
- if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
- if(C)
- message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
- log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban")
- to_chat(C, "You have been autobanned due to a warning by [ckey].
This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.")
- qdel(C)
- else
- message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
- log_admin("[key_name(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
- AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME)
- else
- if(C)
- to_chat(C, "You have been formally warned by an administrator.
Further warnings will result in an autoban.")
- message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
- log_admin("[key_name(src)] has warned [key_name(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
- else
- message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
- log_admin("[key_name(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
-
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Warning") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-#undef MAX_WARNS
-#undef AUTOBANTIME
-
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Event"
set name = "Drop Bomb"
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index e1e31544d3e..d9510a4defb 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -446,9 +446,6 @@
alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok")
unbanpanel()
- else if(href_list["warn"])
- usr.client.warn(href_list["warn"])
-
else if(href_list["unbane"])
if(!check_rights(R_BAN)) return
diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm
index 1979be243fa..112b8cdb64f 100644
--- a/code/modules/client/preference/preferences.dm
+++ b/code/modules/client/preference/preferences.dm
@@ -71,7 +71,6 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
var/max_gear_slots = 0
//non-preference stuff
- var/warns = 0
var/muted = 0
var/last_ip
var/last_id