Logging tweaks.

Uploading a new library book now also gives an admin notice.
Admin logs will now add a (JMP) if at all applicable.
This commit is contained in:
PsiOmegaDelta
2016-01-08 15:22:43 +01:00
parent ecd70a7cb9
commit 2c1debbcaa
6 changed files with 11 additions and 9 deletions
+4 -3
View File
@@ -2,10 +2,11 @@
/mob/var/lastattacked = null
/mob/var/attack_log = list()
proc/log_and_message_admins_with_location(var/message, var/x, var/y, var/z, var/mob/user = usr)
log_and_message_admins("[message] (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", user)
proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
var/turf/T = location ? location : (user ? get_turf(user) : null)
if(T)
message = message + " (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)"
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
message_admins(user ? "[key_name_admin(user)] [message]" : "EVENT [message]")
+1 -1
View File
@@ -13,7 +13,7 @@
kill()
return
log_and_message_admins_with_location("Event: Blob spawned at \the [get_area(T)] ([T.x],[T.y],[T.z])", T.x, T.y, T.z)
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
Blob = new /obj/effect/blob/core(T)
for(var/i = 1; i < rand(3, 4), i++)
Blob.process()
@@ -16,7 +16,7 @@
vine.mature_time = 0
vine.process()
log_and_message_admins_with_location("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])", T.x, T.y, T.z)
log_and_message_admins("Spacevines spawned at \the [get_area(T)]", location = T)
return
log_and_message_admins("<span class='notice'>Event: Spacevines failed to find a viable turf.</span>")
+1
View File
@@ -353,6 +353,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
if(!query.Execute())
usr << query.ErrorMsg()
else
log_and_message_admins("has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete.")