Skip to content

Commit

Permalink
Fixes up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolis2011 committed Sep 28, 2019
1 parent 4ac406f commit 2f60c32
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 70 deletions.
12 changes: 6 additions & 6 deletions code/datums/server_greeting.dm
Expand Up @@ -213,17 +213,17 @@
var/list/data = list("div" = "", "content" = "", "update" = 1, "changeHash" = null)

if (outdated_info & OUTDATED_NOTE)
to_chat(user, output("#note-placeholder", "greeting.browser:RemoveElement"))
send_output(user, "#note-placeholder", "greeting.browser:RemoveElement")

data["div"] = "#note"
data["update"] = 1

for (var/datum/client_notification/a in user.prefs.notifications)
data["content"] = a.get_html()
to_chat(user, output(JS_SANITIZE(data), "greeting.browser:AddContent"))
send_output(user, JS_SANITIZE(data), "greeting.browser:AddContent")

if (!user.holder)
to_chat(user, output("#memo-tab", "greeting.browser:RemoveElement"))
send_output(user, "#memo-tab", "greeting.browser:RemoveElement")
else
if (outdated_info & OUTDATED_MEMO)
data["update"] = 1
Expand All @@ -234,7 +234,7 @@

data["div"] = "#memo"
data["content"] = get_memo_content(user)
to_chat(user, output(JS_SANITIZE(data), "greeting.browser:AddContent"))
send_output(user, JS_SANITIZE(data), "greeting.browser:AddContent")

if (outdated_info & OUTDATED_MOTD)
data["update"] = 1
Expand All @@ -245,7 +245,7 @@

data["div"] = "#motd"
data["content"] = motd
to_chat(user, output(JS_SANITIZE(data), "greeting.browser:AddContent"))
send_output(user, JS_SANITIZE(data), "greeting.browser:AddContent")

data["div"] = "#testmerges"
data["content"] = revdata.greeting_info
Expand All @@ -255,7 +255,7 @@
else
data["update"] = 0
data["changeHash"] = null
to_chat(user, output(JS_SANITIZE(data), "greeting.browser:AddContent"))
send_output(user, JS_SANITIZE(data), "greeting.browser:AddContent")

/*
* Basically the Topic proc for the greeting datum.
Expand Down
2 changes: 1 addition & 1 deletion code/js/byjax.dm
Expand Up @@ -45,6 +45,6 @@ proc/send_byjax(receiver, control_id, target_element, new_content=null, callback
/* if(callback_args)
argums += "&[list2params(callback_args)]"
*/
to_chat(receiver, output(argums,"[control_id]:replaceContent"))
send_output(receiver, argums, "[control_id]:replaceContent")
return

2 changes: 1 addition & 1 deletion code/modules/admin/DB ban/ban_mirroring.dm
Expand Up @@ -342,7 +342,7 @@
data += list(list(C.ckey, C.address, C.computer_id))

var/data_str = json_encode(data)
to_chat(C, output(list2params(list("E-DAT", data_str, 900)), "greeting.browser:setCookie"))
send_output(C, list2params(list("E-DAT", data_str, 900)), "greeting.browser:setCookie")

#undef BAD_CID
#undef BAD_IP
Expand Down
2 changes: 1 addition & 1 deletion code/modules/chat/chat_datum.dm
Expand Up @@ -87,7 +87,7 @@
return "Ligth"

/datum/chat/proc/jscall(var/list/params, var/function)
client << output(list2params(params),"browseroutput:[function]")
send_output(client, list2params(params), "browseroutput:[function]")

/datum/chat/proc/FinilizeLoading()
if(loaded)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/nano/nanoui.dm
Expand Up @@ -469,7 +469,7 @@ nanoui is used to open and update nano browser uis
var/list/send_data = get_send_data(data)

//to_chat(user, list2json(data) // used for debugging)
to_chat(user, output(list2params(list(json_encode(send_data))),"[window_id].browser:receiveUpdateData"))
send_output(user, list2params(list(json_encode(send_data))),"[window_id].browser:receiveUpdateData")

/**
* This Topic() proc is called whenever a user clicks on a link within a Nano UI
Expand Down
118 changes: 59 additions & 59 deletions code/modules/scripting/IDE.dm
Expand Up @@ -13,16 +13,16 @@ client/verb/tcssave()
log_misc(msg)
message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[mob.x];Y=[mob.y];Z=[mob.z]'>JMP</a>)",0,1)
Server.setcode( tcscode ) // this actually saves the code from input to the server
to_chat(src, output(null, "tcserror")) // clear the errors)
send_output(src, null, "tcserror") // clear the errors)
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")


client/verb/tcscompile()
Expand All @@ -39,42 +39,42 @@ client/verb/tcscompile()
var/list/compileerrors = Server.compile() // then compile the code!

// Output all the compile-time errors
to_chat(src, output(null, "tcserror"))
send_output(src, null, "tcserror")

if(compileerrors.len)
to_chat(src, output("<b>Compile Errors</b>", "tcserror"))
send_output(src, "<b>Compile Errors</b>", "tcserror")
for(var/scriptError/e in compileerrors)
to_chat(src, output("<font color = red>\t>[e.message]</font>", "tcserror"))
to_chat(src, output("([compileerrors.len] errors)", "tcserror"))
send_output(src, "<font color = red>\t>[e.message]</font>", "tcserror")
send_output(src, "([compileerrors.len] errors)", "tcserror")

// Output compile errors to all other people viewing the code too
for(var/mob/M in Machine.viewingcode)
if(M.client)
to_chat(M, output(null, "tcserror"))
to_chat(M, output("<b>Compile Errors</b>", "tcserror"))
send_output(M, null, "tcserror")
send_output(M, "<b>Compile Errors</b>", "tcserror")
for(var/scriptError/e in compileerrors)
to_chat(M, output("<font color = red>\t>[e.message]</font>", "tcserror"))
to_chat(M, output("([compileerrors.len] errors)", "tcserror"))
send_output(M, "<font color = red>\t>[e.message]</font>", "tcserror")
send_output(M, "([compileerrors.len] errors)", "tcserror")


else
to_chat(src, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
to_chat(src, output("(0 errors)", "tcserror"))
send_output(src, "<font color = blue>TCS compilation successful!</font>", "tcserror")
send_output(src, "(0 errors)", "tcserror")

for(var/mob/M in Machine.viewingcode)
if(M.client)
to_chat(M, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
to_chat(M, output("(0 errors)", "tcserror"))
send_output(M, "<font color = blue>TCS compilation successful!</font>", "tcserror")
send_output(M, "(0 errors)", "tcserror")

else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")

client/verb/tcsrun()
set hidden = 1
Expand All @@ -90,32 +90,32 @@ client/verb/tcsrun()
var/list/compileerrors = Server.compile() // then compile the code!

// Output all the compile-time errors
to_chat(src, output(null, "tcserror"))
send_output(src, null, "tcserror")

if(compileerrors.len)
to_chat(src, output("<b>Compile Errors</b>", "tcserror"))
send_output(src, "<b>Compile Errors</b>", "tcserror")
for(var/scriptError/e in compileerrors)
to_chat(src, output("<font color = red>\t>[e.message]</font>", "tcserror"))
to_chat(src, output("([compileerrors.len] errors)", "tcserror"))
send_output(src, "<font color = red>\t>[e.message]</font>", "tcserror")
send_output(src, "([compileerrors.len] errors)", "tcserror")

// Output compile errors to all other people viewing the code too
for(var/mob/M in Machine.viewingcode)
if(M.client)
to_chat(M, output(null, "tcserror"))
to_chat(M, output("<b>Compile Errors</b>", "tcserror"))
send_output(M, null, "tcserror")
send_output(M, "<b>Compile Errors</b>", "tcserror")
for(var/scriptError/e in compileerrors)
to_chat(M, output("<font color = red>\t>[e.message]</font>", "tcserror"))
to_chat(M, output("([compileerrors.len] errors)", "tcserror"))
send_output(M, "<font color = red>\t>[e.message]</font>", "tcserror")
send_output(M, "([compileerrors.len] errors)", "tcserror")

else
// Finally, we run the code!
to_chat(src, output("<font color = blue>TCS compilation successful! Code executed.</font>", "tcserror"))
to_chat(src, output("(0 errors)", "tcserror"))
send_output(src, "<font color = blue>TCS compilation successful! Code executed.</font>", "tcserror")
send_output(src, "(0 errors)", "tcserror")

for(var/mob/M in Machine.viewingcode)
if(M.client)
to_chat(M, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
to_chat(M, output("(0 errors)", "tcserror"))
send_output(M, "<font color = blue>TCS compilation successful!</font>", "tcserror")
send_output(M, "(0 errors)", "tcserror")

var/datum/signal/signal = new()
signal.data["message"] = ""
Expand All @@ -132,14 +132,14 @@ client/verb/tcsrun()


else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")


client/verb/exittcs()
Expand Down Expand Up @@ -171,16 +171,16 @@ client/verb/tcsrevert()

winset(mob, "tcscode", "text=\"[showcode]\"")

to_chat(src, output(null, "tcserror")) // clear the errors)
send_output(src, null, "tcserror") // clear the errors
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to revert: Unable to locate server machine.</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to revert: Unable to locate server machine.</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror")


client/verb/tcsclearmem()
Expand All @@ -195,17 +195,17 @@ client/verb/tcsclearmem()
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
Server.memory = list() // clear the memory
// Show results
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = blue>Server memory cleared!</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = blue>Server memory cleared!</font>", "tcserror")
for(var/mob/M in Machine.viewingcode)
if(M.client)
to_chat(M, output("<font color = blue>Server memory cleared!</font>", "tcserror"))
send_output(M, "<font color = blue>Server memory cleared!</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate server machine.</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to clear memory: Unable to locate server machine.</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror")
else
to_chat(src, output(null, "tcserror"))
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror"))
send_output(src, null, "tcserror")
send_output(src, "<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror")
2 changes: 1 addition & 1 deletion code/modules/vueui/ui.dm
Expand Up @@ -265,7 +265,7 @@ main ui datum.
/datum/vueui/proc/push_change(var/list/ndata)
if(ndata && status > STATUS_DISABLED)
src.data = ndata
user << output(list2params(list(generate_data_json())),"[windowid].browser:receiveUIState")
send_output(user, list2params(list(generate_data_json())),"[windowid].browser:receiveUIState")

/**
* Check for change and push that change of data
Expand Down

0 comments on commit 2f60c32

Please sign in to comment.