diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index 99fa1c50e0a..a51c0b1bcfc 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -18,7 +18,6 @@ #define BANTYPE_JOB_PERMA 3 #define BANTYPE_JOB_TEMP 4 #define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. -#define BANTYPE_APPEARANCE 6 #define BANTYPE_ADMIN_PERMA 7 #define BANTYPE_ADMIN_TEMP 8 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 794ca47df46..8d97a764e47 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -120,7 +120,6 @@ GLOBAL_VAR_INIT(nologevent, 0) body += "Kick | " body += "Ban | " body += "Jobban | " - body += "Appearance Ban | " body += "Notes | " body += "View Karma | " if(GLOB.configuration.url.forum_playerinfo_url) diff --git a/code/modules/admin/banappearance.dm b/code/modules/admin/banappearance.dm deleted file mode 100644 index 4544edba3f8..00000000000 --- a/code/modules/admin/banappearance.dm +++ /dev/null @@ -1,99 +0,0 @@ -//ban people from using custom names and appearances. that'll show 'em. - -GLOBAL_VAR(appearanceban_runonce) //Updates legacy bans with new info -GLOBAL_LIST_EMPTY(appearance_keylist) //to store the keys - -/proc/appearance_fullban(mob/M, reason) - if(!M || !M.key) return - GLOB.appearance_keylist.Add(text("[M.ckey] ## [reason]")) - appearance_savebanfile() - -/proc/appearance_client_fullban(ckey) - if(!ckey) return - GLOB.appearance_keylist.Add(text("[ckey]")) - appearance_savebanfile() - -//returns a reason if M is banned, returns 0 otherwise -/proc/appearance_isbanned(mob/M) - if(M) - for(var/s in GLOB.appearance_keylist) - if(findtext(s, "[M.ckey]") == 1) - var/startpos = findtext(s, "## ") + 3 - if(startpos && startpos < length(s)) - var/text = copytext(s, startpos, 0) - if(text) - return text - return "Reason Unspecified" - return 0 - -/* -DEBUG -/mob/verb/list_all_appearances() - set name = "list all appearances" - - for(var/s in appearance_keylist) - to_chat(world, s) - -/mob/verb/reload_appearances() - set name = "reload appearances" - - appearance_loadbanfile() -*/ -// AA 2020-11-25: This entire proc isnt even called. What the actual fuck. -// AA 2021-05-23: This entire proc STILL isnt even called. I am going to screan. -/proc/appearance_loadbanfile() - if(!GLOB.configuration.general.use_database_bans) - var/savefile/S=new("data/appearance_full.ban") - S["keys[0]"] >> GLOB.appearance_keylist - log_admin("Loading appearance_rank") - S["runonce"] >> GLOB.appearanceban_runonce - - if(!length(GLOB.appearance_keylist)) - GLOB.appearance_keylist=list() - log_admin("appearance_keylist was empty") - else - if(!SSdbcore.IsConnected()) - log_world("Database connection failed. Reverting to the legacy ban system.") - GLOB.configuration.general.use_database_bans = FALSE - appearance_loadbanfile() - return - - //appearance bans - var/datum/db_query/appearanceban_query = SSdbcore.NewQuery("SELECT ckey FROM ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1") - - if(!appearanceban_query.warn_execute()) - qdel(appearanceban_query) - return FALSE - - while(appearanceban_query.NextRow()) - var/ckey = appearanceban_query.item[1] - - GLOB.appearance_keylist.Add("[ckey]") - - qdel(appearanceban_query) - -/proc/appearance_savebanfile() - var/savefile/S=new("data/appearance_full.ban") - to_chat(S["keys[0]"], GLOB.appearance_keylist) - -/proc/appearance_unban(mob/M) - appearance_remove("[M.ckey]") - appearance_savebanfile() - - -/proc/appearance_updatelegacybans() - if(!GLOB.appearanceban_runonce) - log_admin("Updating appearancefile!") - // Updates bans.. Or fixes them. Either way. - for(var/T in GLOB.appearance_keylist) - if(!T) continue - GLOB.appearanceban_runonce++ //don't run this update again - - -/proc/appearance_remove(X) - for(var/i = 1; i <= length(GLOB.appearance_keylist); i++) - if( findtext(GLOB.appearance_keylist[i], "[X]") ) - GLOB.appearance_keylist.Remove(GLOB.appearance_keylist[i]) - appearance_savebanfile() - return 1 - return 0 diff --git a/code/modules/admin/db_ban/functions.dm b/code/modules/admin/db_ban/functions.dm index 999ba84b5e6..b65f5decd8c 100644 --- a/code/modules/admin/db_ban/functions.dm +++ b/code/modules/admin/db_ban/functions.dm @@ -37,10 +37,6 @@ bantype_str = "JOB_TEMPBAN" bantype_pass = 1 isjobban = 1 - if(BANTYPE_APPEARANCE) - bantype_str = "APPEARANCE_BAN" - duration = -1 - bantype_pass = 1 if(BANTYPE_ADMIN_PERMA) bantype_str = "ADMIN_PERMABAN" duration = -1 @@ -214,9 +210,6 @@ bantype_str = "JOB_TEMPBAN" bantype_pass = 1 isjobban = 1 - if(BANTYPE_APPEARANCE) - bantype_str = "APPEARANCE_BAN" - bantype_pass = 1 if(BANTYPE_ADMIN_PERMA) bantype_str = "ADMIN_PERMABAN" bantype_pass = 1 @@ -459,7 +452,6 @@ output += "" output += "" output += "" - output += "" output += "" output += "" output += "" @@ -501,7 +493,6 @@ output += "" output += "" output += "" - output += "" output += "" output += "" output += "" @@ -576,8 +567,6 @@ bantypesearch += "'JOB_PERMABAN' " if(BANTYPE_JOB_TEMP) bantypesearch += "'JOB_TEMPBAN' " - if(BANTYPE_APPEARANCE) - bantypesearch += "'APPEARANCE_BAN' " if(BANTYPE_ADMIN_PERMA) bantypesearch = "'ADMIN_PERMABAN' " if(BANTYPE_ADMIN_TEMP) @@ -629,8 +618,6 @@ typedesc = "JOBBAN
([job])" if("JOB_TEMPBAN") typedesc = "TEMP JOBBAN
([job])
([duration] minutes
Expires [expiration]" - if("APPEARANCE_BAN") - typedesc = "APPEARANCE/NAME BAN" if("ADMIN_PERMABAN") typedesc = "ADMIN PERMABAN" if("ADMIN_TEMPBAN") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index c15cdbc929a..20ff7bb3394 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -137,12 +137,6 @@ to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return job_ban = TRUE - if(BANTYPE_APPEARANCE) - if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") - return - banduration = null - banjob = null if(BANTYPE_ADMIN_PERMA) if(!banckey || !banreason) to_chat(usr, "Not enough parameters (Requires ckey and reason)") @@ -493,55 +487,6 @@ GLOB.banlist_savefile.cd = "/base" unbanpanel() - /////////////////////////////////////new ban stuff - - else if(href_list["appearanceban"]) - if(!check_rights(R_BAN)) - return - var/mob/M = locateUID(href_list["appearanceban"]) - if(!istype(M, /mob)) - to_chat(usr, "This can only be used on instances of type /mob") - return - if(!M.ckey) //sanity - to_chat(usr, "This mob has no ckey") - return - var/ban_ckey_param = href_list["dbbanaddckey"] - - var/banreason = appearance_isbanned(M) - if(banreason) - /* if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") - DB_ban_panel(M.ckey) - return */ - switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No")) - if("Yes") - log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban") - DB_ban_unban(M.ckey, BANTYPE_APPEARANCE) - appearance_unban(M) - message_admins("[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1) - to_chat(M, "[usr.client.ckey] has removed your appearance ban.") - - else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel")) - if("Yes") - var/reason = input(usr,"Please state the reason","Reason") as message|null - if(!reason) - return - M = admin_ban_mobsearch(M, ban_ckey_param, usr) - log_admin("[key_name(usr)] appearance banned [key_name(M)]. \nReason: [reason]") - DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason) - appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") - add_note(M.ckey, "Appearance banned - [reason]", null, usr.ckey, 0) - message_admins("[key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1) - to_chat(M, "You have been appearance banned by [usr.client.ckey].") - to_chat(M, "The reason is: [reason]") - to_chat(M, "Appearance ban can be lifted only upon request.") - if(GLOB.configuration.url.banappeals_url) - to_chat(M, "To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]") - else - to_chat(M, "No ban appeals URL has been set.") - if("No") - return - else if(href_list["jobban2"]) // if(!check_rights(R_BAN)) return diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 62f8020d574..3af6756a0f5 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -174,10 +174,6 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "" dat += "
" dat += "

Identity

" - if(appearance_isbanned(user)) - dat += "You are banned from using custom names and appearances. \ - You can continue to adjust your characters, but you will be randomised once you join the game.\ -
" dat += "Gender: [active_character.gender == MALE ? "Male" : (active_character.gender == FEMALE ? "Female" : "Genderless")]" dat += "
" dat += "Age: [active_character.age]
" diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index eee2b99da0d..fe524ea5851 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -542,7 +542,7 @@ var/mob/living/carbon/human/new_character = new(loc) new_character.lastarea = get_area(loc) - if(SSticker.random_players || appearance_isbanned(new_character)) + if(SSticker.random_players) client.prefs.active_character.randomise() client.prefs.active_character.real_name = random_name(client.prefs.active_character.gender) client.prefs.active_character.copy_to(new_character) diff --git a/paradise.dme b/paradise.dme index a29b6fc9851..10853436ee4 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1181,7 +1181,6 @@ #include "code\modules\admin\admin_memo.dm" #include "code\modules\admin\admin_ranks.dm" #include "code\modules\admin\admin_verbs.dm" -#include "code\modules\admin\banappearance.dm" #include "code\modules\admin\banjob.dm" #include "code\modules\admin\centcom_ban_db.dm" #include "code\modules\admin\cookielog.dm"