diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm index 8ecf572ea7..f580eab3d5 100644 --- a/code/_globalvars/configuration.dm +++ b/code/_globalvars/configuration.dm @@ -3,7 +3,6 @@ GLOBAL_REAL(config, /datum/controller/configuration) GLOBAL_DATUM_INIT(revdata, /datum/getrev, new) GLOBAL_VAR(host) -GLOBAL_VAR(join_motd) GLOBAL_VAR(station_name) GLOBAL_VAR_INIT(game_version, "/tg/ Station 13") GLOBAL_VAR_INIT(changelog_hash, "") diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 5936c564ce..6e2a050fd0 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -18,6 +18,8 @@ GLOBAL_PROTECT(config_dir) var/list/mode_reports var/list/mode_false_report_weight + var/motd + /datum/controller/configuration/New() config = src InitEntries() @@ -28,6 +30,7 @@ GLOBAL_PROTECT(config_dir) LoadEntries("dbconfig.txt") LoadEntries("comms.txt") loadmaplist(CONFIG_MAPS_FILE) + LoadMOTD() /datum/controller/configuration/Destroy() entries_by_type.Cut() @@ -192,6 +195,12 @@ GLOBAL_PROTECT(config_dir) qdel(M) votable_modes += "secret" +/datum/controller/configuration/proc/LoadMOTD() + motd = file2text("[GLOB.config_dir]/motd.txt") + var/tm_info = GLOB.revdata.GetTestMergeInfo() + if(motd || tm_info) + motd = motd ? "[motd]
[tm_info]" : tm_info + /datum/controller/configuration/proc/loadmaplist(filename) log_config("Loading config file [filename]...") filename = "[GLOB.config_dir][filename]" diff --git a/code/game/world.dm b/code/game/world.dm index ab5f3ea934..bbf614e90f 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -24,7 +24,6 @@ GLOBAL_PROTECT(security_mode) SERVER_TOOLS_ON_NEW - load_motd() load_admins() LoadVerbs(/datum/verbs/menu) if(CONFIG_GET(flag/usewhitelist)) @@ -195,9 +194,6 @@ GLOBAL_PROTECT(security_mode) log_world("World rebooted at [time_stamp()]") ..() -/world/proc/load_motd() - GLOB.join_motd = file2text("config/motd.txt") + "
" + GLOB.revdata.GetTestMergeInfo() - /world/proc/update_status() var/list/features = list() diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 3287e27f6d..e3e9842703 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -229,8 +229,9 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR) set category = "OOC" set desc ="Check the Message of the Day" - if(GLOB.join_motd) - to_chat(src, "
[GLOB.join_motd]
") + var/motd = global.config.motd + if(motd) + to_chat(src, "
[motd]
") else to_chat(src, "The Message of the Day has not been set.") diff --git a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm index 26d05c6ff0..8a97180588 100644 --- a/code/modules/mob/dead/new_player/login.dm +++ b/code/modules/mob/dead/new_player/login.dm @@ -9,8 +9,9 @@ ..() - if(GLOB.join_motd) - to_chat(src, "
[GLOB.join_motd]
") + var/motd = global.config.motd + if(motd) + to_chat(src, "
[motd]
") if(GLOB.admin_notice) to_chat(src, "Admin Notice:\n \t [GLOB.admin_notice]")