UDP Logging (#1997)

This implements UDP Logging with GELF.
It will allow full text search over all the logs and attributes sent over GELF to the log server.
This commit is contained in:
Werner
2017-04-01 23:47:00 +03:00
committed by skull132
parent a07a459f9e
commit 59e7377798
168 changed files with 602 additions and 414 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
set category = "Admin"
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
message_admins("\red ERROR: Non-admin [usr.key] attempted to execute a SDQL query!")
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!")
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!",level=2,ckey=key_name(usr))
var/list/query_list = SDQL_tokenize(query_text)
+1 -1
View File
@@ -4,7 +4,7 @@
set category = "Admin"
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
message_admins("\red ERROR: Non-admin [usr.key] attempted to execute a SDQL query!")
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!")
log_admin("Non-admin [usr.key] attempted to execute a SDQL query!",level=2,ckey=key_name(usr))
if(!query_text || length(query_text) < 1)
return
+1 -1
View File
@@ -116,7 +116,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
src << "<font color='blue'>PM to-<b>Staff </b>: [original_msg]</font>"
var/admin_number_active = admin_number_present - admin_number_afk
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.",admin_key=key_name(src))
if(admin_number_active <= 0)
discord_bot.send_to_admins("@everyone Request for Help from [key_name(src)]: [html_decode(original_msg)] - !![admin_number_afk ? "All admins AFK ([admin_number_afk])" : "No admins online"]!!")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+7 -7
View File
@@ -15,7 +15,7 @@
usr.on_mob_jump()
usr.loc = pick(get_area_turfs(A))
log_admin("[key_name(usr)] jumped to [A]")
log_admin("[key_name(usr)] jumped to [A]", admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
@@ -27,7 +27,7 @@
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
usr.on_mob_jump()
usr.loc = T
@@ -44,7 +44,7 @@
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [key_name(M)]")
log_admin("[key_name(usr)] jumped to [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(src.mob)
var/mob/A = src.mob
@@ -94,7 +94,7 @@
src << "No keys found."
return
var/mob/M = selection:mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
log_admin("[key_name(usr)] jumped to [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.on_mob_jump()
usr.loc = M.loc
@@ -109,7 +109,7 @@
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] teleported [key_name(M)]")
log_admin("[key_name(usr)] teleported [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.on_mob_jump()
M.loc = get_turf(usr)
@@ -136,7 +136,7 @@
if(!M)
return
log_admin("[key_name(usr)] teleported [key_name(M)]")
log_admin("[key_name(usr)] teleported [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
if(M)
M.on_mob_jump()
@@ -157,7 +157,7 @@
M.loc = pick(get_area_turfs(A))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
else
alert("Admin jumping disabled")
+1 -1
View File
@@ -107,7 +107,7 @@
if(C.prefs && C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]",admin_key=key_name(src),text=key_name(C))
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
+4 -4
View File
@@ -7,7 +7,7 @@
msg = sanitize(msg)
if(!msg) return
log_admin("ADMIN: [key_name(src)] : [msg]")
log_admin("ADMIN: [key_name(src)] : [msg]",admin_key=key_name(src))
if(check_rights(R_ADMIN,0))
for(var/client/C in admins)
@@ -24,7 +24,7 @@
if(!check_rights(R_ADMIN|R_MOD)) return
msg = sanitize(msg)
log_admin("MOD: [key_name(src)] : [msg]")
log_admin("MOD: [key_name(src)] : [msg]",admin_key=key_name(src))
if (!msg)
return
@@ -48,7 +48,7 @@
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
log_admin("DEV: [key_name(src)] : [msg]")
log_admin("DEV: [key_name(src)] : [msg]",admin_key=key_name(src))
if(check_rights(R_DEV,0))
msg = "<span class='devsay'><span class='prefix'>DEV:</span> <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message'>[msg]</span></span>"
@@ -66,7 +66,7 @@
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
log_admin("CCIASAY: [key_name(src)] : [msg]")
log_admin("CCIASAY: [key_name(src)] : [msg]",admin_key=key_name(src))
if(check_rights((R_CCIAA|R_ADMIN),0))
msg = "<span class='cciaasay'><span class='prefix'>CCIAAgent:</span> <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message'>[msg]</span></span>"
+1 -1
View File
@@ -27,7 +27,7 @@
else if (M.mind && M.mind.special_role && M.client)
M << "<font color='#960018'><span class='ooc'>" + create_text_tag("aooc", "Antag-OOC:", M.client) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
log_ooc("(ANTAG) [key] : [msg]")
log_ooc("(ANTAG) [key] : [msg]",ckey=key_name(mob))
// Checks if a newly joined player is an antag, and adds the AOOC verb if they are.
// Because they're tied to client objects, this gets removed every time you disconnect.
+5 -5
View File
@@ -3,14 +3,14 @@
set category = "Special Verbs"
if(M.client)
if(M.client.buildmode)
log_admin("[key_name(usr)] has left build mode.")
log_admin("[key_name(usr)] has left build mode.",admin_key=key_name(usr))
M.client.buildmode = 0
M.client.show_popup_menus = 1
for(var/obj/effect/bmode/buildholder/H)
if(H.cl == M.client)
qdel(H)
else
log_admin("[key_name(usr)] has entered build mode.")
log_admin("[key_name(usr)] has entered build mode.",admin_key=key_name(usr))
M.client.buildmode = 1
M.client.show_popup_menus = 0
@@ -278,13 +278,13 @@
if(3)
if(pa.Find("left")) //I cant believe this shit actually compiles.
if(object.vars.Find(holder.buildmode.varholder))
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]",admin_key=key_name(usr))
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
else
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
if(pa.Find("right"))
if(object.vars.Find(holder.buildmode.varholder))
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]",admin_key=key_name(usr))
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
else
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
@@ -296,4 +296,4 @@
if(pa.Find("right"))
if(holder.throw_atom)
holder.throw_atom.throw_at(object, 10, 1)
log_admin("[key_name(usr)] threw [holder.throw_atom] at [object]")
log_admin("[key_name(usr)] threw [holder.throw_atom] at [object]",admin_key=key_name(usr))
+1 -1
View File
@@ -21,7 +21,7 @@
override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","mercenary","AI malfunction","no override")
ticker.station_explosion_cinematic(parameter,override)
log_admin("[key_name(src)] launched cinematic \"[cinematic]\"")
log_admin("[key_name(src)] launched cinematic \"[cinematic]\"",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] launched cinematic \"[cinematic]\"", 1)
return
+2 -2
View File
@@ -10,11 +10,11 @@
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
if(!input || input == "")
custom_event_msg = null
log_admin("[usr.key] has cleared the custom event text.")
log_admin("[usr.key] has cleared the custom event text.",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] has cleared the custom event text.")
return
log_admin("[usr.key] has changed the custom event text.")
log_admin("[usr.key] has changed the custom event text.",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] has changed the custom event text.")
custom_event_msg = input
+1 -1
View File
@@ -21,7 +21,7 @@
var/stafftype = uppertext(holder.rank)
msg = sanitize(msg)
log_admin("DSAY: [key_name(src)] : [msg]")
log_admin("DSAY: [key_name(src)] : [msg]",admin_key=key_name(src))
msg = process_chat_markup(msg)
+15 -15
View File
@@ -6,11 +6,11 @@
if(Debug2)
Debug2 = 0
message_admins("[key_name(src)] toggled debugging off.")
log_admin("[key_name(src)] toggled debugging off.")
log_admin("[key_name(src)] toggled debugging off.",admin_key=key_name(usr))
else
Debug2 = 1
message_admins("[key_name(src)] toggled debugging on.")
log_admin("[key_name(src)] toggled debugging on.")
log_admin("[key_name(src)] toggled debugging on.",admin_key=key_name(usr))
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -46,7 +46,7 @@
alert("Wait until the game starts")
return
if(istype(M, /mob/living/carbon/human))
log_admin("[key_name(src)] has robotized [M.key].")
log_admin("[key_name(src)] has robotized [M.key].",admin_key=key_name(usr),ckey=key_name(M))
spawn(10)
M:Robotize()
@@ -69,7 +69,7 @@
alert("The mob must not be a new_player.")
return
log_admin("[key_name(src)] has animalized [M.key].")
log_admin("[key_name(src)] has animalized [M.key].",admin_key=key_name(usr),ckey=key_name(M))
spawn(10)
M.Animalize()
@@ -82,11 +82,11 @@
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has alienized [M.key].")
log_admin("[key_name(src)] has alienized [M.key].",admin_key=key_name(usr),ckey=key_name(M))
spawn(10)
M:Alienize()
feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
log_admin("[key_name(usr)] made [key_name(M)] into an alien.",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into an alien.", 1)
else
alert("Invalid mob")
@@ -99,11 +99,11 @@
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has slimeized [M.key].")
log_admin("[key_name(src)] has slimeized [M.key].",admin_key=key_name(usr))
spawn(10)
M:slimeize()
feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
log_admin("[key_name(usr)] made [key_name(M)] into a slime.",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into a slime.", 1)
else
alert("Invalid mob")
@@ -211,7 +211,7 @@
for(var/atom/O in world)
if(istype(O, hsbitem))
qdel(O)
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
log_admin("[key_name(src)] has deleted all instances of [hsbitem].",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -219,7 +219,7 @@
set category = "Debug"
set name = "Make Powernets"
makepowernets()
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -228,7 +228,7 @@
set name = "Toggle Aliens"
config.aliens_allowed = !config.aliens_allowed
log_admin("[key_name(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].")
log_admin("[key_name(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].", 0)
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -260,7 +260,7 @@
else
alert("Invalid mob")
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(src)] has granted [M.key] full access.")
log_admin("[key_name(src)] has granted [M.key] full access.",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue [key_name_admin(usr)] has granted [M.key] full access.", 1)
/client/proc/cmd_assume_direct_control(var/mob/M in mob_list)
@@ -276,7 +276,7 @@
var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
ghost.ckey = M.ckey
message_admins("\blue [key_name_admin(usr)] assumed direct control of [M].", 1)
log_admin("[key_name(usr)] assumed direct control of [M].")
log_admin("[key_name(usr)] assumed direct control of [M].",admin_key=key_name(usr))
var/mob/adminmob = src.mob
M.ckey = src.ckey
if( isobserver(adminmob) )
@@ -882,7 +882,7 @@
M.regenerate_icons()
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..", 1)
return
@@ -968,6 +968,6 @@
var/state="[M.dna.GetSEState(block)?"on":"off"]"
var/blockname=assigned_blocks[block]
message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!")
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!",admin_key=key_name(src),ckey=key_name(M))
else
alert("Invalid mob")
+1 -1
View File
@@ -371,5 +371,5 @@
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)
+4 -4
View File
@@ -130,7 +130,7 @@ var/list/VVckey_edit = list("key", "ckey")
if("No")
L += var_value
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: ADDED=[var_value]"
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
/client/proc/mod_list(var/list/L, atom/O, original_name, objectvar)
@@ -282,7 +282,7 @@ var/list/VVckey_edit = list("key", "ckey")
if("DELETE FROM LIST")
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[variable]")]"
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
L -= variable
return
@@ -344,7 +344,7 @@ var/list/VVckey_edit = list("key", "ckey")
L[L.Find(variable)] = new_var
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: [original_var]=[new_var]"
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]")
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
@@ -588,5 +588,5 @@ var/list/VVckey_edit = list("key", "ckey")
O.vars[variable] = holder.marked_datum
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
+2 -2
View File
@@ -13,7 +13,7 @@ var/list/sounds_cache = list()
if(alert("Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
return
log_admin("[key_name(src)] played sound [S]")
log_admin("[key_name(src)] played sound [S]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
@@ -26,7 +26,7 @@ var/list/sounds_cache = list()
set name = "Play Local Sound"
if(!check_rights(R_SOUNDS)) return
log_admin("[key_name(src)] played a local sound [S]")
log_admin("[key_name(src)] played a local sound [S]",admin_key=key_name(src))
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
playsound(get_turf(src.mob), S, 50, 0, 0)
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+2 -2
View File
@@ -10,10 +10,10 @@
var/turf/T = get_turf(O)
if(T)
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])")
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])",admin_key=key_name(src))
message_admins("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
else
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location")
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location",admin_key=key_name(src))
message_admins("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location", 1)
if(!usr.control_object) //If you're not already possessing something...
+27 -27
View File
@@ -12,7 +12,7 @@
for(var/obj/item/W in M)
M.drop_from_inventory(W)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
log_admin("[key_name(usr)] made [key_name(M)] drop everything!",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -39,7 +39,7 @@
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
spawn(50)
M << "\red You have been sent to the prison station!"
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -61,7 +61,7 @@
if(usr.client.holder)
M << "\bold You hear a voice in your head... \italic [msg]"
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue \bold SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]", 1)
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -114,7 +114,7 @@
if (!msg)
return
world << "[msg]"
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
log_admin("GlobalNarrate: [key_name(usr)] : [msg]",admin_key=key_name(usr))
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -138,7 +138,7 @@
return
M << msg
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -151,7 +151,7 @@
M.status_flags ^= GODMODE
usr << "\blue Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]", 1)
feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -188,7 +188,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(automute)
muteunmute = "auto-muted"
M.client.prefs.muted |= mute_type
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]",ckey=key_name(M))
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
M << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -201,7 +201,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
muteunmute = "muted"
M.client.prefs.muted |= mute_type
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]")
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
M << "You have been [muteunmute] from [mute_string]."
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -214,7 +214,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
log_admin("[key_name(src)] has added a random AI law.")
log_admin("[key_name(src)] has added a random AI law.",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
@@ -292,7 +292,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
G.can_reenter_corpse = 1
G:show_message(text("\blue <B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B>"), 1)
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit")
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit",admin_key=key_name(usr),ckey=key_name(G))
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit", 1)
@@ -325,7 +325,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
src << "\blue <B>AntagHUD usage has been enabled</B>"
log_admin("[key_name(usr)] has [action] antagHUD usage for observers")
log_admin("[key_name(usr)] has [action] antagHUD usage for observers",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has [action] antagHUD usage for observers", 1)
@@ -353,7 +353,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
config.antag_hud_restricted = 1
src << "\red <B>AntagHUD restrictions have been enabled</B>"
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
/*
@@ -490,7 +490,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
O << "\red " + input + "\red...LAWS UPDATED"
O.show_laws()
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
log_admin("Admin [key_name(usr)] has added a new AI law - [input]",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
@@ -512,7 +512,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(config.allow_admin_rev)
M.revive()
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
log_admin("[key_name(usr)] healed / revived [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!", 1)
else
alert("Admin revive disabled")
@@ -576,7 +576,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
world << "\red New [company_name] Update available at all communication consoles."
world << sound('sound/AI/commandreport.ogg')
log_admin("[key_name(src)] has created a command report: [reportbody]")
log_admin("[key_name(src)] has created a command report: [reportbody]",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has created a command report", 1)
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -600,7 +600,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/mob/dead/observer/M = O
if (M.client && alert(src, "They are still connected. Are you sure, they will loose connection.", "Confirmation", "Yes", "No") != "Yes")
return
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])",,admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -643,7 +643,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
explosion(O, devastation, heavy, light, flash)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])")
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EXPL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -664,7 +664,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -683,7 +683,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Due to the delay here its easy for something to have happened to the mob
if(!M) return
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
log_admin("[key_name(usr)] has gibbed [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
if(istype(M, /mob/dead/observer))
@@ -704,7 +704,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
mob.gib()
log_admin("[key_name(usr)] used gibself.")
log_admin("[key_name(usr)] used gibself.",admin_key=key_name(usr))
message_admins("\blue [key_name_admin(usr)] used gibself.", 1)
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
@@ -819,7 +819,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
view = world.view
log_admin("[key_name(usr)] changed their view range to [view].")
log_admin("[key_name(usr)] changed their view range to [view].",admin_key=key_name(usr))
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].", 1) //why? removed by order of XSI
feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -853,7 +853,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
log_admin("[key_name(usr)] admin-called the emergency shuttle.",admin_key=key_name(usr))
message_admins("\blue [key_name_admin(usr)] admin-called the emergency shuttle.", 1)
return
@@ -870,7 +870,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
emergency_shuttle.recall()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.",admin_key=key_name(usr))
message_admins("\blue [key_name_admin(usr)] admin-recalled the emergency shuttle.", 1)
return
@@ -886,7 +886,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
@@ -921,7 +921,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
log_admin("Admin [key_name(src)] has forced the players to have random appearances.",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
@@ -975,7 +975,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("[key_name_admin(usr)] sent a tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.",admin_key=key_name(usr))
feedback_add_details("admin_verb","TIP")
/client/proc/show_tip()
@@ -994,5 +994,5 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("[key_name_admin(usr)] sent a pregenerated tip of the round.")
log_admin("[key_name(usr)] sent a pregenerated Tip of the Round.")
log_admin("[key_name(usr)] sent a pregenerated Tip of the Round.",admin_key=key_name(usr))
feedback_add_details("admin_verb","FAP")
+1 -1
View File
@@ -10,7 +10,7 @@
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
//I've used ticks of 2 before to help with serious singulo lags
if(newtick && newtick <= 2 && newtick > 0)
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", admin_key=key_name(src))
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
world.tick_lag = newtick
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+3 -3
View File
@@ -378,7 +378,7 @@
deleteQuery.Execute(query_details, 1)
message_admins("\blue [key_name_admin(usr)] deleted one of [ckey]'s warnings.")
log_admin("[key_name(usr)] deleted one of [ckey]'s warnings.")
log_admin("[key_name(usr)] deleted one of [ckey]'s warnings.", admin_key=key_name(usr), ckey=ckey)
else
usr << "Cancelled"
return
@@ -395,7 +395,7 @@
reason_query.Execute(query_details, 1)
message_admins("\blue [key_name_admin(usr)] edited one of [ckey]'s warning reasons.")
log_admin("[key_name(usr)] edited one of [ckey]'s warning reasons.")
log_admin("[key_name(usr)] edited one of [ckey]'s warning reasons.", admin_key=key_name(usr), ckey=ckey)
if("editNotes")
query_details += ":new_notes"
@@ -409,4 +409,4 @@
notes_query.Execute(query_details, 1)
message_admins("\blue [key_name_admin(usr)] edited one of [ckey]'s warning notes.")
log_admin("[key_name(usr)] edited one of [ckey]'s warning notes.")
log_admin("[key_name(usr)] edited one of [ckey]'s warning notes.", admin_key=key_name(usr), ckey=ckey)