Merge pull request #38672 from AutomaticFrenzy/patch/goonchat-motd
Fix the MOTD having too many newlines
This commit is contained in:
@@ -233,7 +233,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, OOC_COLOR)
|
||||
|
||||
var/motd = global.config.motd
|
||||
if(motd)
|
||||
to_chat(src, "<div class=\"motd\">[motd]</div>")
|
||||
to_chat(src, "<div class=\"motd\">[motd]</div>", handle_whitespace=FALSE)
|
||||
else
|
||||
to_chat(src, "<span class='notice'>The Message of the Day has not been set.</span>")
|
||||
|
||||
|
||||
@@ -97,7 +97,8 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
|
||||
|
||||
for(var/message in messageQueue)
|
||||
to_chat(owner, message)
|
||||
// whitespace has already been handled by the original to_chat
|
||||
to_chat(owner, message, handle_whitespace=FALSE)
|
||||
|
||||
messageQueue = null
|
||||
sendClientData()
|
||||
@@ -175,7 +176,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
|
||||
//Global chat procs
|
||||
|
||||
/proc/to_chat(target, message)
|
||||
/proc/to_chat(target, message, handle_whitespace=TRUE)
|
||||
if(!target)
|
||||
return
|
||||
|
||||
@@ -201,8 +202,9 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
//Some macros remain in the string even after parsing and fuck up the eventual output
|
||||
message = replacetext(message, "\improper", "")
|
||||
message = replacetext(message, "\proper", "")
|
||||
message = replacetext(message, "\n", "<br>")
|
||||
message = replacetext(message, "\t", "[GLOB.TAB][GLOB.TAB]")
|
||||
if(handle_whitespace)
|
||||
message = replacetext(message, "\n", "<br>")
|
||||
message = replacetext(message, "\t", "[GLOB.TAB][GLOB.TAB]")
|
||||
|
||||
for(var/I in targets)
|
||||
//Grab us a client if possible
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
var/motd = global.config.motd
|
||||
if(motd)
|
||||
to_chat(src, "<div class=\"motd\">[motd]</div>")
|
||||
to_chat(src, "<div class=\"motd\">[motd]</div>", handle_whitespace=FALSE)
|
||||
|
||||
if(GLOB.admin_notice)
|
||||
to_chat(src, "<span class='notice'><b>Admin Notice:</b>\n \t [GLOB.admin_notice]</span>")
|
||||
|
||||
Reference in New Issue
Block a user