Merge pull request #5065 from VOREStation/vs-port-3204

[PORT] Revamp logging for consistency
This commit is contained in:
Neerti
2018-03-20 21:13:47 -04:00
committed by GitHub
113 changed files with 325 additions and 388 deletions

View File

@@ -6,13 +6,13 @@ world/IsBanned(key,address,computer_id)
//Guest Checking
if(!config.guests_allowed && IsGuestKey(key))
log_access("Failed Login: [key] - Guests not allowed")
log_adminwarn("Failed Login: [key] - Guests not allowed")
message_admins("<font color='blue'>Failed Login: [key] - Guests not allowed</font>")
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
//check if the IP address is a known TOR node
if(config && config.ToRban && ToRban_isbanned(address))
log_access("Failed Login: [src] - Banned: ToR")
log_adminwarn("Failed Login: [src] - Banned: ToR")
message_admins("<font color='blue'>Failed Login: [src] - Banned: ToR</font>")
//ban their computer_id and ckey for posterity
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
@@ -24,7 +24,7 @@ world/IsBanned(key,address,computer_id)
//Ban Checking
. = CheckBan( ckey(key), computer_id, address )
if(.)
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
log_adminwarn("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
message_admins("<font color='blue'>Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]</font>")
return .

View File

@@ -12,7 +12,6 @@ var/global/floorIsLava = 0
C << msg
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
log_attack(text)
var/rendered = "<span class=\"log_message\"><span class=\"prefix\">ATTACK:</span> <span class=\"message\">[text]</span></span>"
for(var/client/C in admins)
if((R_ADMIN|R_MOD) & C.holder.rights)

View File

@@ -16,7 +16,7 @@ proc/log_and_message_admins_many(var/list/mob/users, var/message)
log_admin("[english_list(user_keys)] [message]")
message_admins("[english_list(user_keys)] [message]")
/* Old procs
proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
if(victim)
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(attacker)] - [victim_message]</font>")
@@ -42,3 +42,4 @@ proc/admin_inject_log(mob/attacker, mob/victim, obj/item/weapon, reagents, amoun
"used \the [weapon] to [violent]inject - [reagents] - [amount_transferred]u transferred",
"was [violent]injected with \the [weapon] - [reagents] - [amount_transferred]u transferred",
"used \the [weapon] to [violent]inject [reagents] ([amount_transferred]u transferred) into")
*/

View File

@@ -9,7 +9,7 @@
if(!msg)
return
log_admin("ADMIN: [key_name(src)] : [msg]")
log_adminsay(msg,src)
if(check_rights(R_ADMIN,0))
for(var/client/C in admins)
@@ -27,7 +27,7 @@
return
msg = sanitize(msg)
log_admin("MOD: [key_name(src)] : [msg]")
log_modsay(msg,src)
if (!msg)
return
@@ -50,7 +50,7 @@
return
msg = sanitize(msg)
log_admin("EVENT: [key_name(src)] : [msg]")
log_eventsay(msg,src)
if (!msg)
return

View File

@@ -39,4 +39,4 @@
if((M.mind && M.mind.special_role && A && A.can_use_aooc) || isobserver(M)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
to_chat(M, "<span class='ooc'><span class='aooc'>[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[player_display]:</EM> <span class='message'>[msg]</span></span></span>")
log_ooc("(ANTAG) [key] : [msg]")
log_aooc(msg,src)

View File

@@ -85,7 +85,7 @@
set name = "Show Server Log"
set desc = "Shows today's server log."
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")].log"
var/path = "[log_path].log"
if( fexists(path) )
src << run( file(path) )
else
@@ -99,7 +99,10 @@
set category = "Admin"
set name = "Show Server Attack Log"
set desc = "Shows today's server attack log."
to_chat(usr,"This verb doesn't actually do anything.")
/*
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")] Attack.log"
if( fexists(path) )
src << run( file(path) )
@@ -109,3 +112,5 @@
usr << run( file(path) )
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
*/