mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
*NIX Log files part 2.
CR+LF added to new lines, created a global variable log_end that can be used
on newlines
log_misc("blahblah...[log_end]\nMoreblahblah[log_end]")
put [log_end] prior to any \n and it will show up correctly in windows.
Also created log_misc() proc to log to diary, and removed a bunch of
diary << stuff all over the place.
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
href_logfile = file("data/logs/[date_string] hrefs.htm")
|
||||
diary = file("data/logs/[date_string].log")
|
||||
diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
|
||||
diary << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][world.system_type == UNIX ? ascii2text(13) :]\n---------------------[world.system_type == UNIX ? ascii2text(13) :]"
|
||||
diaryofmeanpeople << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][world.system_type == UNIX ? ascii2text(13) :]\n---------------------"
|
||||
diary << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]"
|
||||
diaryofmeanpeople << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]"
|
||||
changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently
|
||||
|
||||
if(byond_version < RECOMMENDED_VERSION)
|
||||
@@ -67,7 +67,7 @@
|
||||
// ..()
|
||||
|
||||
/world/Topic(T, addr, master, key)
|
||||
diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][world.system_type == UNIX ? ascii2text(13) :]"
|
||||
diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]"
|
||||
|
||||
if (T == "ping")
|
||||
var/x = 1
|
||||
@@ -147,7 +147,7 @@
|
||||
if(Lines.len)
|
||||
if(Lines[1])
|
||||
master_mode = Lines[1]
|
||||
diary << "Saved mode is '[master_mode]'[world.system_type == UNIX ? ascii2text(13) :]"
|
||||
log_misc("Saved mode is '[master_mode]'")
|
||||
|
||||
/world/proc/save_mode(var/the_mode)
|
||||
var/F = file("data/mode.txt")
|
||||
@@ -181,7 +181,7 @@
|
||||
if(config.admin_legacy_system)
|
||||
var/text = file2text("config/moderators.txt")
|
||||
if (!text)
|
||||
diary << "Failed to load config/mods.txt[world.system_type == UNIX ? ascii2text(13) :]"
|
||||
error("Failed to load config/mods.txt")
|
||||
else
|
||||
var/list/lines = text2list(text, "\n")
|
||||
for(var/line in lines)
|
||||
|
||||
Reference in New Issue
Block a user