mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
upstream-merge-16484 [MDB IGNORE] (#9289)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -28,22 +28,22 @@
|
||||
|
||||
/proc/log_admin(text)
|
||||
admin_log.Add(text)
|
||||
if (CONFIG_GET(flag/log_admin)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_admin))
|
||||
WRITE_LOG(diary, "ADMIN: [text]")
|
||||
|
||||
/proc/log_adminpm(text, client/source, client/dest)
|
||||
admin_log.Add(text)
|
||||
if (CONFIG_GET(flag/log_admin)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_admin))
|
||||
WRITE_LOG(diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]")
|
||||
|
||||
/proc/log_pray(text, client/source)
|
||||
admin_log.Add(text)
|
||||
if (CONFIG_GET(flag/log_admin)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_admin))
|
||||
WRITE_LOG(diary, "PRAY: [key_name(source)]: [text]")
|
||||
|
||||
/proc/log_debug(text)
|
||||
//if (CONFIG_GET(flag/log_debug)) // CHOMPEdit
|
||||
// WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]")
|
||||
//if (CONFIG_GET(flag/log_debug)) // CHOMPRemove
|
||||
// WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]") // CHOMPRemove
|
||||
WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]")
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
@@ -53,25 +53,25 @@
|
||||
html = span_filter_debuglogs("DEBUG: [text]"))
|
||||
|
||||
/proc/log_game(text)
|
||||
if (CONFIG_GET(flag/log_game)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_game))
|
||||
WRITE_LOG(diary, "GAME: [text]")
|
||||
|
||||
/proc/log_vote(text)
|
||||
if (CONFIG_GET(flag/log_vote)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_vote))
|
||||
WRITE_LOG(diary, "VOTE: [text]")
|
||||
|
||||
/proc/log_access_in(client/new_client)
|
||||
if (CONFIG_GET(flag/log_access)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_access))
|
||||
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
|
||||
WRITE_LOG(diary, "ACCESS IN: [message]") //VOREStation Edit
|
||||
|
||||
/proc/log_access_out(mob/last_mob)
|
||||
if (CONFIG_GET(flag/log_access)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_access))
|
||||
var/message = "[key_name(last_mob)] - IP:[last_mob.lastKnownIP] - CID:Logged Out - BYOND Logged Out"
|
||||
WRITE_LOG(diary, "ACCESS OUT: [message]")
|
||||
|
||||
/proc/log_say(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_say)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_say))
|
||||
WRITE_LOG(diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
//Log the message to in-game dialogue logs, as well. //CHOMPEdit Begin
|
||||
@@ -92,7 +92,7 @@
|
||||
//CHOMPEdit End
|
||||
|
||||
/proc/log_ooc(text, client/user)
|
||||
if (CONFIG_GET(flag/log_ooc)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_ooc))
|
||||
WRITE_LOG(diary, "OOC: [user.simple_info_line()]: [html_decode(text)]")
|
||||
if(!SSdbcore.IsConnected())
|
||||
establish_db_connection()
|
||||
@@ -108,7 +108,7 @@
|
||||
//GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("OOC:") + " - " + span_blue(span_bold("[text]"))
|
||||
|
||||
/proc/log_aooc(text, client/user)
|
||||
if (CONFIG_GET(flag/log_ooc)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_ooc))
|
||||
WRITE_LOG(diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]")
|
||||
if(!SSdbcore.IsConnected())
|
||||
establish_db_connection()
|
||||
@@ -124,7 +124,7 @@
|
||||
//GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("AOOC:") + " - " + span_red(span_bold("[text]"))
|
||||
|
||||
/proc/log_looc(text, client/user)
|
||||
if (CONFIG_GET(flag/log_ooc)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_ooc))
|
||||
WRITE_LOG(diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]")
|
||||
if(!SSdbcore.IsConnected())
|
||||
establish_db_connection()
|
||||
@@ -140,7 +140,7 @@
|
||||
//GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("LOOC:") + " - " + span_orange(span_bold("[text]"))
|
||||
|
||||
/proc/log_whisper(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_whisper)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_whisper))
|
||||
WRITE_LOG(diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
if(speaker.client)
|
||||
@@ -159,7 +159,7 @@
|
||||
qdel(query_insert)
|
||||
|
||||
/proc/log_emote(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_emote)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_emote))
|
||||
WRITE_LOG(diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
@@ -179,23 +179,23 @@
|
||||
//CHOMPEdit End
|
||||
|
||||
/proc/log_attack(attacker, defender, message)
|
||||
if (CONFIG_GET(flag/log_attack)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_attack))
|
||||
WRITE_LOG(diary, "ATTACK: [attacker] against [defender]: [message]")
|
||||
|
||||
/proc/log_adminsay(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_adminchat)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_adminchat))
|
||||
WRITE_LOG(diary, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
/proc/log_modsay(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_adminchat)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_adminchat))
|
||||
WRITE_LOG(diary, "MODSAY: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
/proc/log_eventsay(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_adminchat)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_adminchat))
|
||||
WRITE_LOG(diary, "EVENTSAY: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
/proc/log_ghostsay(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_say)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_say))
|
||||
WRITE_LOG(diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
@@ -216,7 +216,7 @@
|
||||
//CHOMPEdit End
|
||||
|
||||
/proc/log_ghostemote(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_emote)) // CHMOPEdit
|
||||
if (CONFIG_GET(flag/log_emote))
|
||||
WRITE_LOG(diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
@@ -234,11 +234,11 @@
|
||||
//CHOMPEdit End
|
||||
|
||||
/proc/log_adminwarn(text)
|
||||
if (CONFIG_GET(flag/log_adminwarn)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_adminwarn))
|
||||
WRITE_LOG(diary, "ADMINWARN: [html_decode(text)]")
|
||||
|
||||
/proc/log_pda(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_pda)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_pda))
|
||||
WRITE_LOG(diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
@@ -260,8 +260,8 @@
|
||||
|
||||
/proc/log_to_dd(text)
|
||||
to_world_log(text) //this comes before the config check because it can't possibly runtime
|
||||
//if(CONFIG_GET(flag/log_world_output)) // CHOMPEdit
|
||||
// WRITE_LOG(diary, "DD_OUTPUT: [text]")
|
||||
//if(CONFIG_GET(flag/log_world_output)) // CHOMPRemove
|
||||
// WRITE_LOG(diary, "DD_OUTPUT: [text]") // CHOMPRemove
|
||||
WRITE_LOG(diary, "DD_OUTPUT: [text]")
|
||||
|
||||
/proc/log_error(text)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/proc/log_nsay(text, inside, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_say)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_say))
|
||||
WRITE_LOG(diary, "NSAY (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
@@ -17,7 +17,7 @@
|
||||
//CHOMPEdit End
|
||||
|
||||
/proc/log_nme(text, inside, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_emote)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_emote))
|
||||
WRITE_LOG(diary, "NME (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
@@ -35,7 +35,7 @@
|
||||
//CHOMPEdit End
|
||||
|
||||
/proc/log_subtle(text, mob/speaker)
|
||||
if (CONFIG_GET(flag/log_emote)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/log_emote))
|
||||
WRITE_LOG(diary, "SUBTLE: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
//CHOMPEdit Begin
|
||||
if(speaker.client)
|
||||
|
||||
@@ -374,7 +374,7 @@ Proc for attack log creation, because really why not
|
||||
cached_character_icons[cachekey] = .
|
||||
|
||||
/proc/not_has_ooc_text(mob/user)
|
||||
if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15)) // CHOMPEdit
|
||||
if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15))
|
||||
to_chat(user, span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -92,8 +92,8 @@ var/religion_name = null
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
|
||||
|
||||
if (config && CONFIG_GET(string/servername)) // CHOMPEdit
|
||||
world.name = "[CONFIG_GET(string/servername)]: [name]" // CHOMPEdit
|
||||
if (config && CONFIG_GET(string/servername))
|
||||
world.name = "[CONFIG_GET(string/servername)]: [name]"
|
||||
else
|
||||
world.name = new_station_name
|
||||
|
||||
@@ -104,8 +104,8 @@ var/religion_name = null
|
||||
|
||||
using_map.station_name = name
|
||||
|
||||
if (config && CONFIG_GET(string/servername)) // CHOMPEdit
|
||||
world.name = "[CONFIG_GET(string/servername)]: [name]" // CHOMPEdit
|
||||
if (config && CONFIG_GET(string/servername))
|
||||
world.name = "[CONFIG_GET(string/servername)]: [name]"
|
||||
else
|
||||
world.name = name
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* angle2dir
|
||||
*/
|
||||
|
||||
// CHOMPEdit Start
|
||||
//Splits the text of a file at seperator and returns them in a list.
|
||||
//returns an empty list if the file doesn't exist
|
||||
/world/proc/file2list(filename, seperator="\n", trim = TRUE)
|
||||
@@ -36,7 +35,6 @@
|
||||
return "turf"
|
||||
else //regex everything else (works for /proc too)
|
||||
return lowertext(replacetext("[the_type]", "[type2parent(the_type)]/", ""))
|
||||
// CHOMPEdit End
|
||||
|
||||
// Returns an integer given a hexadecimal number string as input.
|
||||
/proc/hex2num(hex)
|
||||
|
||||
@@ -1389,9 +1389,6 @@ var/mob/dview/dview_mob = new
|
||||
#undef NOT_FLAG
|
||||
#undef HAS_FLAG
|
||||
|
||||
//datum may be null, but it does need to be a typed var
|
||||
//#define NAMEOF(datum, X) (#X || ##datum.##X) // CHOMPEdit: Moved to nameof_ch.dm
|
||||
|
||||
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##target, ##var_name, ##var_value)
|
||||
//dupe code because dm can't handle 3 level deep macros
|
||||
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##datum, NAMEOF(##datum, ##var), ##var_value)
|
||||
|
||||
@@ -43,26 +43,26 @@
|
||||
|
||||
//Sender is optional
|
||||
/proc/admin_chat_message(var/message = "Debug Message", var/color = "#FFFFFF", var/sender)
|
||||
if (!CONFIG_GET(string/chat_webhook_url) || !message) // CHOMPEdit
|
||||
if (!CONFIG_GET(string/chat_webhook_url) || !message)
|
||||
return
|
||||
spawn(0)
|
||||
var/query_string = "type=adminalert"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]" // CHOMPEdit
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&msg=[url_encode(message)]"
|
||||
query_string += "&color=[url_encode(color)]"
|
||||
if(sender)
|
||||
query_string += "&from=[url_encode(sender)]"
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
/proc/admin_action_message(var/admin = "INVALID", var/user = "INVALID", var/action = "INVALID", var/reason = "INVALID", var/time = "INVALID")
|
||||
if (!CONFIG_GET(string/chat_webhook_url) || !action) // CHOMPEdit
|
||||
if (!CONFIG_GET(string/chat_webhook_url) || !action)
|
||||
return
|
||||
spawn(0)
|
||||
var/query_string = "type=adminaction"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]" // CHOMPEdit
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&admin=[url_encode(admin)]"
|
||||
query_string += "&user=[url_encode(user)]"
|
||||
query_string += "&action=[url_encode(action)]"
|
||||
query_string += "&reason=[url_encode(reason)]"
|
||||
query_string += "&time=[url_encode(time)]"
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
Reference in New Issue
Block a user