From e736a4ed7e0f57e0d1a5ceff29dfe2be8ff46fc6 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Wed, 28 May 2025 11:14:34 -0700 Subject: [PATCH] [MIRROR] Fixes Nulls getting into the player list (#10966) Co-authored-by: Cameron Lennox --- code/game/world.dm | 2 +- code/modules/mob/new_player/login.dm | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/code/game/world.dm b/code/game/world.dm index a42a0cbd21..00a6cd04ec 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -507,7 +507,7 @@ var/world_topic_spam_protect_time = world.timeofday return 1 /world/proc/load_motd() - GLOB.join_motd = file2text("config/motd.txt") + GLOB.join_motd = GLOB.is_valid_url.Replace(file2text("config/motd.txt"), span_linkify("$1")) /* Replaced with configuration controller /proc/load_configuration() diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 5ec996c18a..ca054ba7df 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -5,15 +5,7 @@ replacement.key = key return - update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying - if(GLOB.join_motd) - GLOB.join_motd = GLOB.is_valid_url.Replace(GLOB.join_motd, span_linkify("$1")) - to_chat(src, examine_block("
[GLOB.join_motd]
")) - - if(has_respawned) - to_chat(src, CONFIG_GET(string/respawn_message)) - has_respawned = FALSE - + update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying if(!mind) mind = new /datum/mind(key) mind.active = 1 @@ -25,18 +17,23 @@ loc = null sight |= SEE_TURFS - initialize_lobby_screen() - player_list |= src GLOB.new_player_list += src created_for = ckey addtimer(CALLBACK(src, PROC_REF(do_after_login)), 4 SECONDS, TIMER_DELETE_ME) + initialize_lobby_screen() /mob/new_player/proc/do_after_login() PRIVATE_PROC(TRUE) if(client) + if(GLOB.join_motd) + to_chat(src, examine_block("
[GLOB.join_motd]
")) + + if(has_respawned) + to_chat(src, CONFIG_GET(string/respawn_message)) + has_respawned = FALSE handle_privacy_poll() client.playtitlemusic() version_warnings()