cleans up some unticked dm files (#18250)

This commit is contained in:
Selis
2025-08-16 05:05:52 +02:00
committed by GitHub
parent 12f2d53116
commit 61750078db
14 changed files with 25 additions and 101 deletions
-1
View File
@@ -146,7 +146,6 @@
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
-10
View File
@@ -112,16 +112,6 @@
cmd_mentor_pm(C, null)
return
if(href_list["irc_msg"])
if(!check_rights_for(src, R_HOLDER) && received_irc_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes
to_chat(src, span_warning("You are no longer able to use this, it's been more than 10 minutes since an admin on IRC has responded to you"))
return
if(mute_irc)
to_chat(usr, span_warning("You cannot use this as your client has been muted from sending messages to the admins on IRC"))
return
send2adminirc(href_list["irc_msg"])
return
//VOREStation Add
if(href_list["discord_reg"])
var/their_id = html_decode(href_list["discord_reg"])
View File
-41
View File
@@ -1,41 +0,0 @@
/proc/send2irc(var/channel, var/msg)
return // VOREStation Edit - Can't exploit shell if we never call shell!
/* Unreachable with above VOREStation Edit
if (config.use_irc_bot)
if (config.use_node_bot)
shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[escape_shell_arg(msg)]\"")
else
if (config.irc_bot_host)
if(config.irc_bot_export)
spawn(-1) // spawn here prevents hanging in the case that the bot isn't reachable
world.Export("http://[config.irc_bot_host]:45678?[list2params(list(pwd=config.comms_password, chan=channel, mesg=msg))]")
else
if(config.use_lib_nudge)
var/nudge_lib
if(world.system_type == MS_WINDOWS)
nudge_lib = "lib\\nudge.dll"
else
nudge_lib = "lib/nudge.so"
spawn(0)
LIBCALL(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[escape_shell_arg(msg)]")
else
spawn(0)
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [escape_shell_arg(msg)]")
return
*/
/proc/send2mainirc(var/msg)
if(CONFIG_GET(string/main_irc))
send2irc(CONFIG_GET(string/main_irc), msg)
return
/proc/send2adminirc(var/msg)
if(CONFIG_GET(string/admin_irc))
send2irc(CONFIG_GET(string/admin_irc), msg)
return
/hook/startup/proc/ircNotify()
send2mainirc("Server starting up on byond://[CONFIG_GET(string/serverurl) ? CONFIG_GET(string/serverurl) : (CONFIG_GET(string/server) ? CONFIG_GET(string/server) : "[world.address]:[world.port]")]")
return 1
-30
View File
@@ -1,30 +0,0 @@
// Ported from /vg/.
/proc/escape_shell_arg(var/arg)
// RCE prevention
// - Encloses arg in single quotes
// - Escapes single quotes
// Also escapes %, ! on windows
if(world.system_type == MS_WINDOWS)
arg = replacetext(arg, "^", "^^") // Escape char
arg = replacetext(arg, "%", "%%") // %PATH% -> %%PATH%%
arg = replacetext(arg, "!", "^!") // !PATH!, delayed variable expansion on Windows
arg = replacetext(arg, "\"", "^\"")
arg = "\"[arg]\""
else
arg = replacetext(arg, "\\", "\\\\'") // Escape char
arg = replacetext(arg, "'", "\\'") // No breaking out of the single quotes.
arg = "'[arg]'"
return arg
/proc/ext_python(var/script, var/arguments, var/scriptsprefix = 1)
return // VOREStation Edit - Can't exploit shell if we never call shell!
/* Unreachable with above vorestation edit
if(scriptsprefix)
script = "scripts/" + script
if(world.system_type == MS_WINDOWS)
script = replacetext(script, "/", "\\")
var/command = config.python_path + " " + script + " " + arguments
return shell(command)
*/
+2 -5
View File
@@ -6,15 +6,12 @@
update_client_z(null)
log_access_out(src)
unset_machine()
var/datum/admins/is_admin = GLOB.admin_datums[src.ckey]
if(is_admin && is_admin.check_for_rights(R_HOLDER))
message_admins("Staff logout: [key_name(src)]") // Staff logout notice displays no matter what
if (SSticker && SSticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = GLOB.admins.len
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
send2adminirc("[key_name(src)] logged out - no more admins online.")
set_listening(NON_LISTENING_ATOM) //maybe remove this, even if it will cause a teensy bit more lag
..()
return 1
return TRUE
+1 -1
View File
@@ -144,7 +144,7 @@ ADMIN_VERB(cmd_mentor_ticket_panel, (R_ADMIN|R_SERVER|R_MOD|R_MENTOR), "Mentor T
//// VOREstation Additions Below
/datum/ticket/proc/send2adminchat()
/datum/ticket/proc/send2adminchatwebhook()
if(!CONFIG_GET(string/chat_webhook_url))
return
+2 -2
View File
@@ -315,7 +315,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick/ticket_list)
log_admin("Ticket #[id]: [key_name(initiator)]: [name] - heard by [admin_number_present] non-AFK admins who have +BAN.")
if(admin_number_present <= 0)
to_chat(C, span_notice("No active admins are online, your adminhelp was sent to the admin discord."))
send2adminchat()
send2adminchatwebhook()
var/list/adm = get_admin_counts()
var/list/activemins = adm["present"]
@@ -790,7 +790,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick/ticket)
final = "[msg] - No admins online"
else
final = "[msg] - All admins stealthed\[[english_list(stealthmins)]\], AFK\[[english_list(afkmins)]\], or lacks +BAN\[[english_list(powerlessmins)]\]! Total: [allmins.len] "
send2irc(source,final)
// send2irc(source,final)
/proc/ircadminwho()
var/list/message = list("Admins: ")