mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 20:22:42 +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:
@@ -10,7 +10,7 @@ client/verb/tcssave()
|
||||
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
|
||||
var/tcscode=winget(src, "tcscode", "text")
|
||||
var/msg="[mob.name] is adding script to server [Server]: [tcscode]"
|
||||
diary << msg
|
||||
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
|
||||
src << output(null, "tcserror") // clear the errors
|
||||
@@ -208,4 +208,4 @@ client/verb/tcsclearmem()
|
||||
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
|
||||
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
|
||||
|
||||
@@ -257,7 +257,7 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
|
||||
var/list/dat = list()
|
||||
while (i < lenh)
|
||||
var/found = findtext(haystack, a, i, 0)
|
||||
//diary << "findtext([haystack], [a], [i], 0)=[found]"
|
||||
//log_misc("findtext([haystack], [a], [i], 0)=[found]")
|
||||
if (found == 0) // Not found
|
||||
break
|
||||
else
|
||||
@@ -265,9 +265,9 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
|
||||
dat+=found
|
||||
count+=1
|
||||
else
|
||||
//diary << "Script found [a] [count] times, aborted"
|
||||
//log_misc("Script found [a] [count] times, aborted")
|
||||
break
|
||||
//diary << "Found [a] at [found]! Moving up..."
|
||||
//log_misc("Found [a] at [found]! Moving up...")
|
||||
i = found + lena
|
||||
if (count == 0)
|
||||
return haystack
|
||||
@@ -281,11 +281,11 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
|
||||
//CharCopy (dest + targetIndex, src + sourceIndex, count);
|
||||
//CharCopy (dest + curPos, source + lastReadPos, precopy);
|
||||
buf+=copytext(haystack,lastReadPos,precopy)
|
||||
diary << "buf+=copytext([haystack],[lastReadPos],[precopy])"
|
||||
diary<<"[buf]"
|
||||
log_misc("buf+=copytext([haystack],[lastReadPos],[precopy])")
|
||||
log_misc("[buf]")
|
||||
lastReadPos = dat[i] + lena
|
||||
//CharCopy (dest + curPos, replace, newValue.length);
|
||||
buf+=b
|
||||
diary<<"[buf]"
|
||||
log_misc("[buf]")
|
||||
buf+=copytext(haystack,lastReadPos, 0)
|
||||
return buf
|
||||
return buf
|
||||
|
||||
Reference in New Issue
Block a user