Replaces the default output with the to_chat wrapper.

This commit is contained in:
Lzimann
2017-03-10 01:32:05 -03:00
parent ffbb492a43
commit 5a618297ce
1034 changed files with 7617 additions and 7680 deletions

View File

@@ -1,6 +1,6 @@
/proc/create_message(type, target_ckey, admin_ckey, text, timestamp, server, secret, logged = 1, browse)
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!type)
return
@@ -57,7 +57,7 @@
/proc/delete_message(message_id, logged = 1, browse)
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
message_id = text2num(message_id)
if(!message_id)
@@ -85,7 +85,7 @@
/proc/edit_message(message_id, browse)
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
message_id = text2num(message_id)
if(!message_id)
@@ -116,7 +116,7 @@
/proc/toggle_message_secrecy(message_id)
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
message_id = text2num(message_id)
if(!message_id)
@@ -140,7 +140,7 @@
/proc/browse_messages(type, target_ckey, index, linkless = 0, filter)
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
var/output
var/ruler = "<hr style='background:#000000; border:0; height:3px'>"
@@ -278,7 +278,7 @@
proc/get_message_output(type, target_ckey)
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!type)
return
@@ -346,7 +346,7 @@ proc/get_message_output(type, target_ckey)
/*alternatively this proc can be run once to pass through every note and attempt to convert it before deleting the file, if done then AUTOCONVERT_NOTES should be turned off
this proc can take several minutes to execute fully if converting and cause DD to hang if converting a lot of notes; it's not advised to do so while a server is live
/proc/mass_convert_notes()
world << "Beginning mass note conversion"
to_chat(world, "Beginning mass note conversion")
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile)
log_game("Error: Cannot access [NOTESFILE]")
@@ -354,7 +354,7 @@ this proc can take several minutes to execute fully if converting and cause DD t
notesfile.cd = "/"
for(var/ckey in notesfile.dir)
convert_notes_sql(ckey)
world << "Deleting NOTESFILE"
to_chat(world, "Deleting NOTESFILE")
fdel(NOTESFILE)
world << "Finished mass note conversion, remember to turn off AUTOCONVERT_NOTES"*/
to_chat(world, "Finished mass note conversion, remember to turn off AUTOCONVERT_NOTES")*/
#undef NOTESFILE