[MIRROR] Fix a bunch of issues and runtimes (#11145)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-05 12:47:08 -07:00
committed by GitHub
parent 199e857d15
commit 46c940fbdf
68 changed files with 205 additions and 234 deletions

View File

@@ -83,7 +83,7 @@
irc = 1
else
recipient = GLOB.directory[whom]
else if(istype(whom,/client))
else if(isclient(whom))
recipient = whom
@@ -104,7 +104,8 @@
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
to_chat(src, msg)
if(msg)
to_chat(src, msg)
else
current_ticket.MessageNoRecipient(msg)
return
@@ -127,11 +128,11 @@
current_ticket.MessageNoRecipient(msg)
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
if (src.handle_spam_prevention(MUTE_ADMINHELP))
return
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG,0)||irc)//no sending html to the poor bots
if(!check_rights(R_SERVER|R_DEBUG, FALSE)||irc)//no sending html to the poor bots
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
return
@@ -141,27 +142,27 @@
var/keywordparsedmsg = keywords_lookup(msg)
if(irc)
to_chat(src, span_admin_pm_notice("PM to-<b>Admins</b>: [rawmsg]"))
admin_ticket_log(src, span_admin_pm_warning("Reply PM from-<b>[key_name(src, TRUE, TRUE)]</b> to <i>IRC</i>: [keywordparsedmsg]"))
to_chat(src, span_admin_pm_notice("PM to-" + span_bold("Admins") + ": [rawmsg]"))
admin_ticket_log(src, span_admin_pm_warning("Reply PM from-" + span_bold("[key_name(src, TRUE, TRUE)]") + " to " + span_italics("IRC") + ": [keywordparsedmsg]"))
ircreplyamount--
send2irc("Reply: [ckey]",rawmsg)
else
if(recipient.holder)
if(holder) //both are admins
to_chat(recipient, span_admin_pm_warning("Admin PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]"))
to_chat(src, span_admin_pm_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]"))
to_chat(recipient, span_admin_pm_warning("Admin PM from-" + span_bold("[key_name(src, recipient, 1)]") + ": [keywordparsedmsg]"))
to_chat(src, span_admin_pm_notice("Admin PM to-" + span_bold("[key_name(recipient, src, 1)]") + ": [keywordparsedmsg]"))
//omg this is dumb, just fill in both their tickets
var/interaction_message = span_admin_pm_notice("PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]")
var/interaction_message = span_admin_pm_notice("PM from-" + span_bold("[key_name(src, recipient, 1)]") + " to-" + span_bold("[key_name(recipient, src, 1)]") + ": [keywordparsedmsg]")
admin_ticket_log(src, interaction_message)
if(recipient != src) //reeee
admin_ticket_log(recipient, interaction_message)
else //recipient is an admin but sender is not
var/replymsg = span_admin_pm_warning("Reply PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]")
var/replymsg = span_admin_pm_warning("Reply PM from-" + span_bold("[key_name(src, recipient, 1)]") + ": [keywordparsedmsg]")
admin_ticket_log(src, replymsg)
to_chat(recipient, replymsg)
to_chat(src, span_admin_pm_notice("PM to-<b>Admins</b>: [msg]"))
to_chat(src, span_admin_pm_notice("PM to-" + span_bold("Admins") + ": [msg]"))
//play the recieving admin the adminhelp sound (if they have them enabled)
if(recipient.prefs?.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping))
@@ -173,9 +174,9 @@
new /datum/ticket(msg, recipient, TRUE, 1)
to_chat(recipient, span_admin_pm_warning(span_huge(span_bold("-- Administrator private message --"))))
to_chat(recipient, span_admin_pm_warning("Admin PM from-<b>[key_name(src, recipient, 0)]</b>: [msg]"))
to_chat(recipient, span_admin_pm_warning("Admin PM from-" + span_bold("[key_name(src, recipient, 0)]") + ": [msg]"))
to_chat(recipient, span_admin_pm_warning(span_italics("Click on the administrator's name to reply.")))
to_chat(src, span_admin_pm_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [msg]"))
to_chat(src, span_admin_pm_notice("Admin PM to-" + span_bold("[key_name(recipient, src, 1)]") + ": [msg]"))
admin_ticket_log(recipient, span_admin_pm_notice("PM From [key_name_admin(src)]: [keywordparsedmsg]"))
@@ -262,7 +263,7 @@
log_admin("IRC PM: [sender] -> [key_name(C)] : [msg]")
to_chat(C, span_admin_pm_warning(span_huge(span_bold("-- Administrator private message --"))))
to_chat(C, span_admin_pm_warning("Admin PM from-<b><a href='byond://?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]"))
to_chat(C, span_admin_pm_warning("Admin PM from-" + span_bold("<a href='byond://?priv_msg=[stealthkey]'>[adminname]</a>") + ": [msg]"))
to_chat(C, span_admin_pm_warning(span_italics("Click on the administrator's name to reply.")))
admin_ticket_log(C, span_admin_pm_notice("PM From [irc_tagged]: [msg]"))

View File

@@ -314,8 +314,8 @@ ADMIN_VERB(narrate_mob_args, R_FUN, "Narrate Entity", "Narrate entities using po
if(tgui_narrate_mode && tgui_narrate_privacy)
A.visible_message(span_italics(span_bold("\The [A.name]") + " [message]"), range = 1)
else if(tgui_narrate_mode && !tgui_narrate_privacy)
A.visible_message(span_bold("\The [A.name]") + "[message]",)
A.visible_message(span_bold("\The [A.name]") + " [message]",)
else if(!tgui_narrate_mode && tgui_narrate_privacy)
A.audible_message(span_italics(span_bold("\The [A.name]") + " [message]"), hearing_distance = 1)
else if(!tgui_narrate_mode && !tgui_narrate_privacy)
A.audible_message(span_bold("\The [A.name]") + "[message]")
A.audible_message(span_bold("\The [A.name]") + " [message]")

View File

@@ -1,7 +1,7 @@
ADMIN_VERB(get_server_logs, R_ADMIN, "Get Server Logs", "View or retrieve logfiles.", ADMIN_CATEGORY_MAIN)
ADMIN_VERB(get_server_logs, (R_ADMIN | R_SERVER), "Get Server Logs", "View or retrieve logfiles.", ADMIN_CATEGORY_MAIN)
user.browseserverlogs()
ADMIN_VERB(get_current_logs, R_ADMIN, "Get Current Logs", "View or retrieve logfiles for the current round.", ADMIN_CATEGORY_MAIN)
ADMIN_VERB(get_current_logs, (R_ADMIN | R_SERVER), "Get Current Logs", "View or retrieve logfiles for the current round.", ADMIN_CATEGORY_MAIN)
user.browseserverlogs(current=TRUE)
/client/proc/browseserverlogs(current=FALSE)