Easier stripping of admin private information from public logs (#24222)

A new admin log proc, admin_log_private that appends a different prefix,
to make it easy to filter the logs that are shown publically
This commit is contained in:
oranges
2017-02-21 10:56:25 +01:00
committed by AnturK
parent ba1e4f2f33
commit cd1e9ea6c8
7 changed files with 35 additions and 29 deletions
+2 -2
View File
@@ -124,7 +124,7 @@
//send it to irc if nobody is on and tell us how many were on
var/admin_number_present = send2irc_adminless_only(ckey,original_msg)
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
log_admin_private("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
if(admin_number_present <= 0)
src << "<span class='notice'>No active admins are online, your adminhelp was sent to the admin irc.</span>"
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -191,4 +191,4 @@
else
message += "[admin]"
return jointext(message, "")
return jointext(message, "")
+4 -4
View File
@@ -176,12 +176,12 @@
return
if(irc)
log_admin("PM: [key_name(src)]->IRC: [rawmsg]")
log_admin_private("PM: [key_name(src)]->IRC: [rawmsg]")
for(var/client/X in admins)
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC:</B> \blue [keywordparsedmsg]</font>" //inform X
else
window_flash(C, ignorepref = TRUE)
log_admin("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
log_admin_private("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
@@ -208,7 +208,7 @@
return "No message"
message_admins("IRC message from [sender] to [key_name_admin(C)] : [msg]")
log_admin("IRC PM: [sender] -> [key_name(C)] : [msg]")
log_admin_private("IRC PM: [sender] -> [key_name(C)] : [msg]")
msg = emoji_parse(msg)
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
@@ -237,4 +237,4 @@
stealthminID["IRCKEY"] = stealth
return stealth
#undef IRCREPLYCOUNT
#undef IRCREPLYCOUNT