Merge pull request #38672 from AutomaticFrenzy/patch/goonchat-motd

Fix the MOTD having too many newlines
This commit is contained in:
Jordan Brown
2018-06-25 10:18:20 -04:00
committed by letterjay
parent dd03c3e104
commit 1c41c36489
3 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -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