mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] JSON Logging Refactor (#11623)
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
272afa33c8
commit
5a62077f2c
@@ -1,18 +1,24 @@
|
||||
#ifndef OVERRIDE_BAN_SYSTEM
|
||||
//Blocks an attempt to connect before even creating our client datum thing.
|
||||
/world/IsBanned(key,address,computer_id)
|
||||
/world/IsBanned(key, address, computer_id, type, real_bans_only=FALSE)
|
||||
if (!key || (!real_bans_only && (!address || !computer_id)))
|
||||
if(real_bans_only)
|
||||
return FALSE
|
||||
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
|
||||
|
||||
if(ckey(key) in GLOB.admin_datums)
|
||||
return ..()
|
||||
|
||||
//Guest Checking
|
||||
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key))
|
||||
log_adminwarn("Failed Login: [key] - Guests not allowed")
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins(span_blue("Failed Login: [key] - Guests not allowed"))
|
||||
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_GET(flag/ToRban) && ToRban_isbanned(address))
|
||||
log_adminwarn("Failed Login: [src] - Banned: ToR")
|
||||
log_access("Failed Login: [src] - Banned: ToR")
|
||||
message_admins(span_blue("Failed Login: [src] - Banned: ToR"))
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
@@ -24,7 +30,7 @@
|
||||
//Ban Checking
|
||||
. = CheckBan( ckey(key), computer_id, address )
|
||||
if(.)
|
||||
log_adminwarn("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
|
||||
log_suspicious_login("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
|
||||
message_admins(span_blue("Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]"))
|
||||
return .
|
||||
|
||||
@@ -35,8 +41,9 @@
|
||||
var/ckeytext = ckey(key)
|
||||
|
||||
if(!establish_db_connection())
|
||||
error("Ban database connection failure. Key [ckeytext] not checked")
|
||||
log_misc("Ban database connection failure. Key [ckeytext] not checked")
|
||||
var/msg = "Ban database connection failure. Key [ckeytext] not checked"
|
||||
log_world(msg)
|
||||
message_admins(msg)
|
||||
return
|
||||
|
||||
var/failedcid = 1
|
||||
@@ -53,7 +60,7 @@
|
||||
if(isnum(text2num(computer_id)))
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
else
|
||||
log_misc("Key [ckeytext] cid not checked. Non-Numeric: [computer_id]")
|
||||
log_world("Key [ckeytext] cid not checked. Non-Numeric: [computer_id]")
|
||||
failedcid = 1
|
||||
|
||||
var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
|
||||
/proc/ToRban_update()
|
||||
spawn(0)
|
||||
log_misc("Downloading updated ToR data...")
|
||||
log_world("Downloading updated ToR data...")
|
||||
var/http[] = world.Export("https://check.torproject.org/exit-addresses")
|
||||
|
||||
var/list/rawlist = file2list(http["CONTENT"])
|
||||
var/list/rawlist = world.file2list(http["CONTENT"])
|
||||
if(rawlist.len)
|
||||
fdel(TORFILE)
|
||||
var/savefile/F = new(TORFILE)
|
||||
@@ -36,11 +36,11 @@
|
||||
if(!cleaned) continue
|
||||
F[cleaned] << 1
|
||||
F["last_update"] << world.realtime
|
||||
log_misc("ToR data updated!")
|
||||
log_world("ToR data updated!")
|
||||
if(usr)
|
||||
to_chat(usr, span_filter_adminlog("ToRban updated."))
|
||||
return
|
||||
log_misc("ToR data update aborted: no data.")
|
||||
log_world("ToR data update aborted: no data.")
|
||||
return
|
||||
|
||||
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
|
||||
|
||||
@@ -4,7 +4,7 @@ GLOBAL_VAR_INIT(floorIsLava, 0)
|
||||
////////////////////////////////
|
||||
/proc/message_admins(var/msg)
|
||||
msg = span_filter_adminlog(span_log_message(span_prefix("ADMIN LOG:") + span_message("[msg]")))
|
||||
//log_adminwarn(msg) //log_and_message_admins is for this
|
||||
//log_admin_private(msg) //log_and_message_admins is for this
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights_for(C, (R_ADMIN|R_MOD|R_SERVER)))
|
||||
@@ -542,8 +542,8 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
|
||||
else
|
||||
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
|
||||
|
||||
//to_world("Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
|
||||
//to_world("Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
|
||||
//to_chat(world, "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
|
||||
//to_chat(world, "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
|
||||
|
||||
var/datum/browser/popup = new(owner, "admincaster_main", "Admin Newscaster", 400, 600)
|
||||
popup.add_head_content("<TITLE>Admin Newscaster</TITLE>")
|
||||
@@ -830,9 +830,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed))
|
||||
if (CONFIG_GET(flag/ooc_allowed))
|
||||
to_world(span_world("The OOC channel has been globally enabled!"))
|
||||
to_chat(world, span_world("The OOC channel has been globally enabled!"))
|
||||
else
|
||||
to_world(span_world("The OOC channel has been globally disabled!"))
|
||||
to_chat(world, span_world("The OOC channel has been globally disabled!"))
|
||||
log_and_message_admins("toggled OOC.")
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -846,9 +846,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed))
|
||||
if (CONFIG_GET(flag/looc_allowed))
|
||||
to_world(span_world("The LOOC channel has been globally enabled!"))
|
||||
to_chat(world, span_world("The LOOC channel has been globally enabled!"))
|
||||
else
|
||||
to_world(span_world("The LOOC channel has been globally disabled!"))
|
||||
to_chat(world, span_world("The LOOC channel has been globally disabled!"))
|
||||
log_and_message_admins("toggled LOOC.")
|
||||
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -863,9 +863,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed))
|
||||
if (CONFIG_GET(flag/dsay_allowed))
|
||||
to_world(span_world("Deadchat has been globally enabled!"))
|
||||
to_chat(world, span_world("Deadchat has been globally enabled!"))
|
||||
else
|
||||
to_world(span_world("Deadchat has been globally disabled!"))
|
||||
to_chat(world, span_world("Deadchat has been globally disabled!"))
|
||||
log_admin("[key_name(usr)] toggled deadchat.")
|
||||
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
|
||||
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
|
||||
@@ -925,7 +925,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
SSticker.start_immediately = FALSE
|
||||
to_world(span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
|
||||
to_chat(world, span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
|
||||
log_and_message_admins("cancelled immediate game start.")
|
||||
|
||||
/datum/admins/proc/toggleenter()
|
||||
@@ -934,9 +934,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name="Toggle Entering"
|
||||
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed))
|
||||
if (!CONFIG_GET(flag/enter_allowed))
|
||||
to_world(span_world("New players may no longer enter the game."))
|
||||
to_chat(world, span_world("New players may no longer enter the game."))
|
||||
else
|
||||
to_world(span_world("New players may now enter the game."))
|
||||
to_chat(world, span_world("New players may now enter the game."))
|
||||
log_admin("[key_name(usr)] toggled new player game entering.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled new player game entering."), 1)
|
||||
world.update_status()
|
||||
@@ -948,9 +948,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name="Toggle AI"
|
||||
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai))
|
||||
if (!CONFIG_GET(flag/allow_ai))
|
||||
to_world(span_world("The AI job is no longer chooseable."))
|
||||
to_chat(world, span_world("The AI job is no longer chooseable."))
|
||||
else
|
||||
to_world(span_world("The AI job is chooseable now."))
|
||||
to_chat(world, span_world("The AI job is chooseable now."))
|
||||
log_admin("[key_name(usr)] toggled AI allowed.")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -961,9 +961,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name="Toggle Respawn"
|
||||
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed))
|
||||
if(CONFIG_GET(flag/abandon_allowed))
|
||||
to_world(span_world("You may now respawn."))
|
||||
to_chat(world, span_world("You may now respawn."))
|
||||
else
|
||||
to_world(span_world("You may no longer respawn :("))
|
||||
to_chat(world, span_world("You may no longer respawn :("))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
@@ -985,9 +985,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name="Toggle Mapload Persistent Data"
|
||||
CONFIG_SET(flag/persistence_ignore_mapload, !CONFIG_GET(flag/persistence_ignore_mapload))
|
||||
if(!CONFIG_GET(flag/persistence_ignore_mapload))
|
||||
to_world(span_world("Persistence is now enabled."))
|
||||
to_chat(world, span_world("Persistence is now enabled."))
|
||||
else
|
||||
to_world(span_world("Persistence is no longer enabled."))
|
||||
to_chat(world, span_world("Persistence is no longer enabled."))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].")
|
||||
world.update_status()
|
||||
@@ -1024,10 +1024,10 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
return
|
||||
GLOB.round_progressing = !GLOB.round_progressing
|
||||
if (!GLOB.round_progressing)
|
||||
to_world(span_world("The game start has been delayed."))
|
||||
to_chat(world, span_world("The game start has been delayed."))
|
||||
log_admin("[key_name(usr)] delayed the game.")
|
||||
else
|
||||
to_world(span_world("The game will start soon."))
|
||||
to_chat(world, span_world("The game will start soon."))
|
||||
log_admin("[key_name(usr)] removed the delay.")
|
||||
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1294,9 +1294,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name="Toggle tinted welding helmets."
|
||||
CONFIG_SET(flag/welder_vision, !CONFIG_GET(flag/welder_vision))
|
||||
if (CONFIG_GET(flag/welder_vision))
|
||||
to_world(span_world("Reduced welder vision has been enabled!"))
|
||||
to_chat(world, span_world("Reduced welder vision has been enabled!"))
|
||||
else
|
||||
to_world(span_world("Reduced welder vision has been disabled!"))
|
||||
to_chat(world, span_world("Reduced welder vision has been disabled!"))
|
||||
log_admin("[key_name(usr)] toggled welder vision.")
|
||||
message_admins("[key_name_admin(usr)] toggled welder vision.", 1)
|
||||
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -1307,9 +1307,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set name="Toggle guests"
|
||||
CONFIG_SET(flag/guests_allowed, !CONFIG_GET(flag/guests_allowed))
|
||||
if (!CONFIG_GET(flag/guests_allowed))
|
||||
to_world(span_world("Guests may no longer enter the game."))
|
||||
to_chat(world, span_world("Guests may no longer enter the game."))
|
||||
else
|
||||
to_world(span_world("Guests may now enter the game."))
|
||||
to_chat(world, span_world("Guests may now enter the game."))
|
||||
log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."), 1)
|
||||
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
set category = "Admin.Logs"
|
||||
set name = "Check Player Attack Logs"
|
||||
set desc = "Check a player's attack logs."
|
||||
show_cmd_admin_check_player_logs(M)
|
||||
|
||||
show_cmd_admin_check_player_logs(M)
|
||||
|
||||
@@ -13,25 +12,17 @@
|
||||
if(M.mind)
|
||||
dat += span_bold("Current Antag?:") + " [(M.mind.special_role)?"Yes":"No"]<br>"
|
||||
dat += "<br>" + span_bold("Note:") + " This is arranged from earliest to latest. <br><br>"
|
||||
//CHOMPEdit Begin
|
||||
/*for(var/d in M.dialogue_log)
|
||||
dat += "[d]<br>"*/
|
||||
var/datum/db_query/query = SSdbcore.NewQuery("SELECT id,time,ckey,mob,message from erro_attacklog WHERE ckey = :t_ckey", list("t_ckey" = M.ckey))
|
||||
if(!query.Execute())
|
||||
dat += span_italics("Database query error")
|
||||
else
|
||||
var/messages = ""
|
||||
while(query.NextRow())
|
||||
messages += "([query.item[2]]) (ckey:[query.item[3]] real_name:[query.item[4]]) [query.item[5]]<br>"
|
||||
|
||||
if(messages=="")
|
||||
dat+= span_italics("Query returned nothing.")
|
||||
else
|
||||
dat += "<fieldset style='border: 2px solid white; display: inline'>"
|
||||
dat += messages
|
||||
dat += "</fieldset>"
|
||||
qdel(query)
|
||||
//CHOMPEdit End
|
||||
|
||||
if(!isemptylist(M.attack_log))
|
||||
dat += "<fieldset style='border: 2px solid white; display: inline'>"
|
||||
for(var/l in M.attack_log)
|
||||
dat += "[l]<br>"
|
||||
|
||||
dat += "</fieldset>"
|
||||
|
||||
else
|
||||
dat += span_italics("No attack logs found for [M].")
|
||||
|
||||
var/datum/browser/popup = new(usr, "admin_attack_log", "[src]", 650, 650, src)
|
||||
popup.set_content(jointext(dat,null))
|
||||
@@ -55,26 +46,15 @@
|
||||
dat += span_bold("Current Antag?:") + " [(M.mind.special_role)?"Yes":"No"]<br>"
|
||||
dat += "<br>" + span_bold("Note:") + " This is arranged from earliest to latest. <br><br>"
|
||||
|
||||
if(!isemptylist(M.dialogue_log))
|
||||
dat += "<fieldset style='border: 2px solid white; display: inline'>"
|
||||
|
||||
//CHOMPEdit Begin
|
||||
/*for(var/d in M.dialogue_log)
|
||||
dat += "[d]<br>"*/
|
||||
var/datum/db_query/query = SSdbcore.NewQuery("SELECT mid,time,ckey,mob,type,message from erro_dialog WHERE ckey = :t_ckey", list("t_ckey" = M.ckey))
|
||||
if(!query.Execute())
|
||||
dat += span_italics("Database query error")
|
||||
for(var/d in M.dialogue_log)
|
||||
dat += "[d]<br>"
|
||||
|
||||
dat += "</fieldset>"
|
||||
else
|
||||
var/messages = ""
|
||||
while(query.NextRow())
|
||||
messages += "([query.item[2]]) (ckey:[query.item[3]] real_name:[query.item[4]] type:[query.item[5]]) [query.item[6]]<br>"
|
||||
|
||||
if(messages=="")
|
||||
dat+=span_italics("Query returned nothing.")
|
||||
else
|
||||
dat += "<fieldset style='border: 2px solid white; display: inline'>"
|
||||
dat += messages
|
||||
dat += "</fieldset>"
|
||||
qdel(query)
|
||||
//CHOMPEdit End
|
||||
dat += span_italics("No dialogue logs found for [M].")
|
||||
var/datum/browser/popup = new(usr, "admin_dialogue_log", "[src]", 650, 650, src)
|
||||
popup.set_content(jointext(dat,null))
|
||||
popup.open()
|
||||
|
||||
@@ -211,7 +211,6 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/hide_verbs, //hides all our adminverbs,
|
||||
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
|
||||
/client/proc/cmd_check_new_players, //allows us to see every new player,
|
||||
/datum/admins/proc/view_runtimes,
|
||||
// /client/proc/show_gm_status, //We don't use SSgame_master yet.
|
||||
/datum/admins/proc/set_uplink,
|
||||
/datum/admins/proc/change_weather,
|
||||
|
||||
@@ -193,6 +193,10 @@ ADMIN_VERB(game_panel, R_ADMIN|R_SERVER|R_FUN, "Game Panel", "Look at the state
|
||||
user.holder.Game()
|
||||
feedback_add_details("admin_verb","GP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/// Returns this client's stealthed ckey
|
||||
/client/proc/getStealthKey()
|
||||
return GLOB.stealthminID[ckey]
|
||||
|
||||
/client/proc/findStealthKey(txt)
|
||||
if(txt)
|
||||
for(var/P in GLOB.stealthminID)
|
||||
|
||||
@@ -70,8 +70,7 @@ DEBUG
|
||||
log_admin("jobban_keylist was empty")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
error("Database connection failed. Reverting to the legacy ban system.")
|
||||
log_misc("Database connection failed. Reverting to the legacy ban system.")
|
||||
log_sql("Database connection failed. Reverting to the legacy ban system.")
|
||||
CONFIG_SET(flag/ban_legacy_system, TRUE)
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
@@ -268,7 +268,7 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
var/client/C = usr.client
|
||||
if(!C)
|
||||
// CRASH("No client for HrefToken()!") //Chomp EDIT - this seems be to encountered and we don't want this to crash
|
||||
log_debug("Attempted to retrieve a HrefToken of an entity with no client.") //Chomp EDIT
|
||||
log_runtime("Attempted to retrieve a HrefToken of an entity with no client.") //Chomp EDIT
|
||||
return 0 //Chomp EDIT
|
||||
var/datum/admins/holder = C.holder
|
||||
if(holder)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
body += "<a href='byond://?src=\ref[src];[HrefToken()];adminplayeropts="+ref+"'>PP</a> - "
|
||||
body += "<a href='byond://?src=\ref[src];[HrefToken()];notes=show;mob="+ref+"'>N</a> - "
|
||||
body += "<a href='byond://?_src_=vars;Vars="+ref+"'>VV</a> - "
|
||||
body += "<a href='byond://?_src_=vars;[HrefToken()];Vars="+ref+"'>VV</a> - "
|
||||
body += "<a href='byond://?src=\ref[src];[HrefToken()];traitor="+ref+"'>TP</a> - "
|
||||
body += "<a href='byond://?src=\ref[usr];[HrefToken()];priv_msg=\ref"+ref+"'>PM</a> - "
|
||||
body += "<a href='byond://?src=\ref[src];[HrefToken()];subtlemessage="+ref+"'>SM</a> - "
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
var/msg = !auth ? "no" : "a bad"
|
||||
message_admins("[key_name_admin(usr)] clicked an href with [msg] authorization key!")
|
||||
|
||||
/* Debug code in case one needs to dig missing token HREFS
|
||||
var/debug_admin_hrefs = TRUE // Remove once everything is converted over
|
||||
if(debug_admin_hrefs)
|
||||
message_admins("Debug mode enabled, call not blocked. Please ask your coders to review this round's logs.")
|
||||
log_world("UAH: [href]")
|
||||
return TRUE
|
||||
*/
|
||||
|
||||
log_admin("[key_name(usr)] clicked an href with [msg] authorization key! [href]")
|
||||
|
||||
@@ -865,7 +867,7 @@
|
||||
GLOB.master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [config.mode_names[GLOB.master_mode]].")
|
||||
message_admins(span_blue("[key_name_admin(usr)] set the mode as [config.mode_names[GLOB.master_mode]]."), 1)
|
||||
to_world(span_world(span_blue("The mode is now: [config.mode_names[GLOB.master_mode]]")))
|
||||
to_chat(world, span_world(span_blue("The mode is now: [config.mode_names[GLOB.master_mode]]")))
|
||||
Game() // updates the main game menu
|
||||
world.save_mode(GLOB.master_mode)
|
||||
.(href, list("c_mode"=1))
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
F << text
|
||||
to_world(span_filter_system("Completeled successfully and written to [F]"))
|
||||
to_chat(world, span_filter_system("Completeled successfully and written to [F]"))
|
||||
|
||||
@@ -3,7 +3,7 @@ ADMIN_VERB(cmd_admin_say, R_ADMIN, "ASay", "Send a message to other admins", "Ad
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
log_adminsay(msg, user)
|
||||
user.mob.log_talk(message, LOG_ASAY)
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights_for(C, R_ADMIN))
|
||||
@@ -13,7 +13,7 @@ ADMIN_VERB(cmd_admin_say, R_ADMIN, "ASay", "Send a message to other admins", "Ad
|
||||
|
||||
ADMIN_VERB(cmd_mod_say, (R_ADMIN|R_MOD|R_SERVER), "Msay", "Send a message to other mod", "Admin.Chat", message as text)
|
||||
var/msg = sanitize(message)
|
||||
log_modsay(msg, user)
|
||||
log_modsay(msg, list("speaker" = user))
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -29,7 +29,7 @@ ADMIN_VERB(cmd_mod_say, (R_ADMIN|R_MOD|R_SERVER), "Msay", "Send a message to oth
|
||||
|
||||
ADMIN_VERB(cmd_event_say, (R_ADMIN|R_MOD|R_EVENT|R_SERVER), "Esay", "Send a message to other event manager", "Admin.Chat", message as text)
|
||||
var/msg = sanitize(message)
|
||||
log_eventsay(msg, user)
|
||||
log_eventsay(msg, list("speaker" = user))
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
if((M.mind && M.mind.special_role && A && A.can_hear_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_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[player_display]:</EM> " + span_message("[msg]"))))
|
||||
|
||||
log_aooc(msg,src)
|
||||
src.mob.log_talk("(AOOC) [msg]", LOG_OOC)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", ADMIN_CATEGORY_FUN)
|
||||
ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", "Fun.Do Not")
|
||||
var/datum/cinematic/choice = tgui_input_list(
|
||||
user,
|
||||
"Chose a cinematic to play to everyone in the server.",
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
GLOB.custom_event_msg = input
|
||||
|
||||
to_world(span_filter_system("<h1>[span_alert("Custom Event")]</h1>"))
|
||||
to_world(span_filter_system("<h2>[span_alert("A custom event is starting. OOC Info:")]</h2>"))
|
||||
to_world(span_filter_system(span_alert("[GLOB.custom_event_msg]")))
|
||||
to_world(span_filter_system("<br>"))
|
||||
to_chat(world, span_filter_system("<h1>[span_alert("Custom Event")]</h1>"))
|
||||
to_chat(world, span_filter_system("<h2>[span_alert("A custom event is starting. OOC Info:")]</h2>"))
|
||||
to_chat(world, span_filter_system(span_alert("[GLOB.custom_event_msg]")))
|
||||
to_chat(world, span_filter_system("<br>"))
|
||||
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_CUSTOM_EVENT,
|
||||
|
||||
@@ -393,33 +393,33 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
|
||||
var/list/areas_without_intercom = areas_all - areas_with_intercom
|
||||
var/list/areas_without_camera = areas_all - areas_with_camera
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT AN APC:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT AN APC:"))
|
||||
for(var/areatype in areas_without_APC)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT AN AIR ALARM:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT AN AIR ALARM:"))
|
||||
for(var/areatype in areas_without_air_alarm)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT A REQUEST CONSOLE:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT A REQUEST CONSOLE:"))
|
||||
for(var/areatype in areas_without_RC)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT ANY LIGHTS:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT ANY LIGHTS:"))
|
||||
for(var/areatype in areas_without_light)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT A LIGHT SWITCH:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT A LIGHT SWITCH:"))
|
||||
for(var/areatype in areas_without_LS)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT ANY INTERCOMS:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT ANY INTERCOMS:"))
|
||||
for(var/areatype in areas_without_intercom)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_world(span_bold("AREAS WITHOUT ANY CAMERAS:"))
|
||||
to_chat(world, span_bold("AREAS WITHOUT ANY CAMERAS:"))
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_world("* [areatype]")
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
/datum/admins/proc/cmd_admin_dress(input in getmobs())
|
||||
set category = "Fun.Event Kit"
|
||||
@@ -624,15 +624,17 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
|
||||
else
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
/datum/admins/proc/view_runtimes()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "View Runtimes"
|
||||
set desc = "Open the Runtime Viewer"
|
||||
ADMIN_VERB(view_runtimes, R_DEBUG, "View Runtimes", "Opens the runtime viewer.", ADMIN_CATEGORY_DEBUG)
|
||||
GLOB.error_cache.show_to(user)
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
error_cache.showTo(usr)
|
||||
// The runtime viewer has the potential to crash the server if there's a LOT of runtimes
|
||||
// this has happened before, multiple times, so we'll just leave an alert on it
|
||||
if(GLOB.total_runtimes >= 50000) // arbitrary number, I don't know when exactly it happens
|
||||
var/warning = "There are a lot of runtimes, clicking any button (especially \"linear\") can have the potential to lag or crash the server"
|
||||
if(GLOB.total_runtimes >= 100000)
|
||||
warning = "There are a TON of runtimes, clicking any button (especially \"linear\") WILL LIKELY crash the server"
|
||||
// Not using TGUI alert, because it's view runtimes, stuff is probably broken
|
||||
tgui_alert(user, "[warning]. Proceed with caution. If you really need to see the runtimes, download the runtime log and view it in a text editor.", "HEED THIS WARNING CAREFULLY MORTAL")
|
||||
|
||||
/datum/admins/proc/change_weather()
|
||||
set category = "Debug.Events"
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
var/dice = num2text(sum) + "d" + num2text(side)
|
||||
|
||||
if(tgui_alert(usr, "Do you want to inform the world about your game?","Show world?",list("Yes", "No")) == "Yes")
|
||||
to_world("<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>")
|
||||
to_chat(world, "<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>")
|
||||
|
||||
var/result = roll(dice)
|
||||
|
||||
if(tgui_alert(usr, "Do you want to inform the world about the result?","Show world?",list("Yes", "No")) == "Yes")
|
||||
to_world("<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>")
|
||||
to_chat(world, "<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>")
|
||||
|
||||
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
|
||||
|
||||
@@ -5,7 +5,7 @@ ADMIN_VERB(fix_atmos, (R_ADMIN|R_DEBUG|R_EVENT), "Fix Atmospherics Grief", "View
|
||||
feedback_add_details("admin_verb","FA")
|
||||
|
||||
log_and_message_admins("Full atmosphere reset initiated by [user].")
|
||||
to_world(span_danger("Initiating restart of atmosphere. The server may lag a bit."))
|
||||
to_chat(world, span_danger("Initiating restart of atmosphere. The server may lag a bit."))
|
||||
sleep(10)
|
||||
var/current_time = world.timeofday
|
||||
|
||||
@@ -43,4 +43,4 @@ ADMIN_VERB(fix_atmos, (R_ADMIN|R_DEBUG|R_EVENT), "Fix Atmospherics Grief", "View
|
||||
SSair.RebootZAS()
|
||||
|
||||
to_chat(user, "\[5/5\] - ZAS Rebooted")
|
||||
to_world(span_danger("Atmosphere restart completed in " + span_bold("[(world.timeofday - current_time)/10]") + " seconds."))
|
||||
to_chat(world, span_danger("Atmosphere restart completed in " + span_bold("[(world.timeofday - current_time)/10]") + " seconds."))
|
||||
|
||||
@@ -310,9 +310,9 @@ var/list/debug_verbs = list (
|
||||
if(i*10+j <= atom_list.len)
|
||||
temp_atom = atom_list[i*10+j]
|
||||
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
|
||||
to_world(line)*/
|
||||
to_chat(world, line)*/
|
||||
|
||||
to_world("There are [count] objects of type [type_path] on z-level [num_level]")
|
||||
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
|
||||
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/count_objects_all()
|
||||
@@ -337,7 +337,7 @@ var/list/debug_verbs = list (
|
||||
if(i*10+j <= atom_list.len)
|
||||
temp_atom = atom_list[i*10+j]
|
||||
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
|
||||
to_world(line)*/
|
||||
to_chat(world, line)*/
|
||||
|
||||
to_world("There are [count] objects of type [type_path] in the game world")
|
||||
to_chat(world, "There are [count] objects of type [type_path] in the game world")
|
||||
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -103,7 +103,7 @@ var/list/sounds_cache = list()
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
var/list/sounds = file2list("sound/serversound_list.txt");
|
||||
var/list/sounds = world.file2list("sound/serversound_list.txt");
|
||||
sounds += "--CANCEL--"
|
||||
sounds += sounds_cache
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
to_chat(src, "Your prayers have been received by the gods.", confidential = TRUE)
|
||||
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_pray(raw_msg, src)
|
||||
log_prayer("[src.key]/([src.name]): [raw_msg]")
|
||||
|
||||
/proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage)
|
||||
msg = span_blue(span_bold(span_orange("[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:") + "[key_name(Sender, 1)] [ADMIN_PP(Sender)] [ADMIN_VV(Sender)] [ADMIN_SM(Sender)] ([admin_jump_link(Sender)]) [ADMIN_CA(Sender)] [ADMIN_BSA(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:") + " [msg]")
|
||||
|
||||
@@ -124,7 +124,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
|
||||
if (!msg) // We check both before and after, just in case sanitization ended us up with empty message.
|
||||
return
|
||||
|
||||
to_world("[msg]")
|
||||
to_chat(world, "[msg]")
|
||||
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
|
||||
message_admins(span_blue(span_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!
|
||||
@@ -710,7 +710,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
|
||||
if(confirm == "Yes")
|
||||
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
|
||||
else
|
||||
to_world(span_red("New [using_map.company_name] Update available at all communication consoles."))
|
||||
to_chat(world, span_red("New [using_map.company_name] Update available at all communication consoles."))
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
log_admin("[key_name(src)] has created a command report: [input]")
|
||||
@@ -964,7 +964,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
|
||||
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
|
||||
|
||||
if(notifyplayers == "Yes")
|
||||
to_world(span_boldannounce(span_blue("Admin [usr.key] has forced the players to have completely random identities!")))
|
||||
to_chat(world, span_boldannounce(span_blue("Admin [usr.key] has forced the players to have completely random identities!")))
|
||||
|
||||
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ GLOBAL_VAR(ert_loaded)
|
||||
GLOB.ert_loaded = TRUE
|
||||
var/datum/map_template/MT = SSmapping.map_templates["Special Area - ERT"]
|
||||
if(!istype(MT))
|
||||
error("ERT Area is not a valid map template!")
|
||||
log_mapping("ERT Area is not a valid map template!")
|
||||
else
|
||||
MT.load_new_z(centered = TRUE)
|
||||
log_and_message_admins("Loaded the ERT shuttle just now.")
|
||||
|
||||
@@ -75,7 +75,7 @@ GLOBAL_VAR(trader_loaded)
|
||||
GLOB.trader_loaded = TRUE
|
||||
var/datum/map_template/MT = SSmapping.map_templates["Special Area - Salamander Trader"] //was: "Special Area - Trader"
|
||||
if(!istype(MT))
|
||||
error("Trader is not a valid map template!")
|
||||
log_mapping("Trader is not a valid map template!")
|
||||
else
|
||||
MT.load_new_z(centered = TRUE)
|
||||
log_and_message_admins("Loaded the trade shuttle just now.")
|
||||
|
||||
Reference in New Issue
Block a user