diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index ef5eb76728..4463209157 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -122,8 +122,6 @@
admins += src
holder.owner = src
- . = ..() //calls mob.Login()
-
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)
prefs = preferences_datums[ckey]
if(!prefs)
@@ -132,6 +130,9 @@
prefs.last_ip = address //these are gonna be used for banning
prefs.last_id = computer_id //these are gonna be used for banning
+ . = ..() //calls mob.Login()
+ prefs.sanitize_preferences()
+
if(custom_event_msg && custom_event_msg != "")
src << "
Custom Event
"
src << "A custom event is taking place. OOC Info:
"
diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm
index 832d529d7c..f72ff0645c 100644
--- a/code/modules/client/preference_setup/preference_setup.dm
+++ b/code/modules/client/preference_setup/preference_setup.dm
@@ -129,8 +129,6 @@
// Need due to, for example, the 01_basic module relying on species having been loaded to sanitize correctly but that isn't loaded until module 03_body.
for(var/datum/category_item/player_setup_item/PI in items)
PI.load_character(S)
- for(var/datum/category_item/player_setup_item/PI in items)
- PI.sanitize_character()
/datum/category_group/player_setup_category/proc/save_character(var/savefile/S)
// Sanitize all data, then save it
@@ -142,8 +140,6 @@
/datum/category_group/player_setup_category/proc/load_preferences(var/savefile/S)
for(var/datum/category_item/player_setup_item/PI in items)
PI.load_preferences(S)
- for(var/datum/category_item/player_setup_item/PI in items)
- PI.sanitize_preferences()
/datum/category_group/player_setup_category/proc/save_preferences(var/savefile/S)
for(var/datum/category_item/player_setup_item/PI in items)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 4aeaf7c800..db12940bd9 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -237,12 +237,14 @@ datum/preferences
else if(href_list["reload"])
load_preferences()
load_character()
+ sanitize_preferences()
else if(href_list["load"])
if(!IsGuestKey(usr.key))
open_load_dialog(usr)
return 1
else if(href_list["changeslot"])
load_character(text2num(href_list["changeslot"]))
+ sanitize_preferences()
close_load_dialog(usr)
else
return 0