Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plexora #2655

Merged
merged 47 commits into from
Oct 22, 2024
Merged

Plexora #2655

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d77426b
feat: [DNM] first SSplexora commit
flleeppyy Jul 17, 2024
1be937b
fix: add "monkestation edit" comments
flleeppyy Jul 17, 2024
a044836
fix: dont include prefix for slash command
flleeppyy Jul 17, 2024
6af68dc
Update monkestation/code/controllers/subsystem/plexora.dm
flleeppyy Jul 17, 2024
c1fa882
Update monkestation/code/controllers/subsystem/plexora.dm
flleeppyy Jul 17, 2024
95875cb
fix: make sure they are facing us!
flleeppyy Jul 17, 2024
e7b1861
fix: no sanitization for plexora
flleeppyy Jul 18, 2024
b216ee8
Merge remote-tracking branch 'refs/remotes/origin/plexora-bot' into p…
flleeppyy Jul 18, 2024
8621d05
Merge branch 'Monkestation:master' into plexora-bot
flleeppyy Jul 18, 2024
e7bfcb0
fix: disable by default
flleeppyy Jul 18, 2024
5fcc539
wipfeat: twitch events, jailing
flleeppyy Jul 21, 2024
9edbddb
Merge branch 'Monkestation:master' into plexora-bot
flleeppyy Jul 21, 2024
d9a06d5
Merge branch 'Monkestation:master' into plexora-bot
flleeppyy Jul 25, 2024
aa0569e
feat: serverrestart
flleeppyy Jul 28, 2024
0c31ad5
Merge branch 'Monkestation:master' into plexora-bot
flleeppyy Aug 2, 2024
8d7ced9
Merge remote-tracking branch 'upstream/master' into plexora-bot
flleeppyy Aug 3, 2024
9d6aa42
more thingys
flleeppyy Aug 3, 2024
df5879f
feat: more things i dont want to explain
flleeppyy Aug 30, 2024
29b88ce
Merge branch 'master' into plexora-bot
flleeppyy Aug 30, 2024
12ab649
feat: basic who, and notes
flleeppyy Aug 30, 2024
1b896a9
shimmy shimmy aye shimmy hey i need to sleep
flleeppyy Aug 30, 2024
2786356
yippe
flleeppyy Sep 1, 2024
7130e1e
fix: mentor honk for external
flleeppyy Sep 1, 2024
af416c7
commiting some shit
flleeppyy Sep 2, 2024
e7a7be5
fix: linter complaining
flleeppyy Sep 2, 2024
7fa2212
ah yes i see.
flleeppyy Sep 2, 2024
520152b
mentor fixy
flleeppyy Sep 3, 2024
99e7d55
feat: add interview things, fix things
flleeppyy Sep 3, 2024
b1d618a
weh
flleeppyy Sep 4, 2024
c570713
fix: name tagging
flleeppyy Sep 4, 2024
25844dc
meow
Absolucy Sep 5, 2024
b561cca
Merge pull request #2 from Absolucy/plexora-bot-pr
flleeppyy Sep 5, 2024
b8f83af
Merge branch 'master' of https://github.com/Monkestation/Monkestation…
Absolucy Sep 10, 2024
fba9136
fix for tming alongside 516
Absolucy Sep 10, 2024
bb2b653
Merge branch 'master' of https://github.com/Monkestation/Monkestation…
Absolucy Sep 11, 2024
f2a97f0
Fix interview runtime
Absolucy Sep 11, 2024
34079f1
Merge branch 'master' of https://github.com/Monkestation/Monkestation…
Absolucy Sep 15, 2024
fe09f8c
Merge branch 'master' of https://github.com/Monkestation/Monkestation…
Absolucy Sep 20, 2024
f230fb6
disable SSplexora during CI, disable firing if init fails
Absolucy Sep 20, 2024
7b4319d
add SSplexora.Recover()
Absolucy Sep 20, 2024
a5ecc3e
hopefully fix this shit
flleeppyy Sep 21, 2024
331d819
Merge branch 'master' of https://github.com/Monkestation/Monkestation…
Absolucy Sep 28, 2024
9f833ee
Merge branch 'master' of https://github.com/Monkestation/Monkestation…
Absolucy Oct 11, 2024
1839868
Some code cleanup
Absolucy Oct 11, 2024
ad5bf1b
Update stage1.dm
dwasint Oct 13, 2024
015ca70
lets get this bread
flleeppyy Oct 22, 2024
158e0a7
oops last minute
flleeppyy Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define MESSAGE_TYPE_ATTACKLOG "attacklog"
#define MESSAGE_TYPE_DEBUG "debug"

#define EXTERNALREPLYCOUNT 2 // monkestation edit
/// Max length of chat message in characters
#define CHAT_MESSAGE_MAX_LENGTH 110

Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
#define INIT_ORDER_VIS 80
#define INIT_ORDER_SECURITY_LEVEL 79 // We need to load before events so that it has a security level to choose from.
#define INIT_ORDER_DISCORD 78
#define INIT_ORDER_ACHIEVEMENTS 77
#define INIT_ORDER_PLEXORA 77 // monkestation addition
#define INIT_ORDER_ACHIEVEMENTS 76 // monkestation edit: 77 -> 76 for plexora
#define INIT_ORDER_STATION 74 //This is high priority because it manipulates a lot of the subsystems that will initialize after it.
#define INIT_ORDER_QUIRKS 73
#define INIT_ORDER_REAGENTS 72 //HAS to be before mapping and assets - both create objects, which creates reagents, which relies on lists made in this subsystem
Expand Down Expand Up @@ -227,6 +228,7 @@
#define FIRE_PRIORITY_ACID 40
#define FIRE_PRIORITY_BURNING 40
#define FIRE_PRIORITY_DEFAULT 50
#define FIRE_PRIORITY_PLEXORA 60 // monkestation addition: plexora
#define FIRE_PRIORITY_PARALLAX 65
#define FIRE_PRIORITY_INSTRUMENTS 80
#define FIRE_PRIORITY_STAMINA 95
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/~monkestation/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
#define POLICY_DEATH "Death"
#define POLICY_REVIVAL "Revival"
#define POLICY_REVIVAL_CLONER "Revival via Cloning"

#define AHELP_CLOSETYPE_CLOSE 0
#define AHELP_CLOSETYPE_REJECT 1
#define AHELP_CLOSETYPE_RESOLVE 2

#define AHELP_CLOSEREASON_NONE 0
#define AHELP_CLOSEREASON_IC 1
#define AHELP_CLOSEREASON_MENTOR 2
7 changes: 7 additions & 0 deletions code/__DEFINES/~monkestation/helpers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// Until a condition is true, sleep, or until a certain amount of time has passed.
/// Basically, UNTIL() but with a timeout.
#define UNTIL_OR_TIMEOUT(Condition, Timeout) \
do { \
var/__end_time = REALTIMEOFDAY + (Timeout); \
UNTIL((Condition) || (REALTIMEOFDAY > __end_time)); \
} while(0)
2 changes: 2 additions & 0 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ GLOBAL_LIST_INIT(round_end_images, world.file2list("data/image_urls.txt")) // MO
send2chat(new /datum/tgs_message_content("[GLOB.round_id ? "Round [GLOB.round_id]" : "The round has"] just ended."), CONFIG_GET(string/channel_announce_end_game))
send2adminchat("Server", "Round just ended.")


if(length(CONFIG_GET(keyed_list/cross_server)))
send_news_report()

Expand Down Expand Up @@ -302,6 +303,7 @@ GLOBAL_LIST_INIT(round_end_images, world.file2list("data/image_urls.txt")) // MO
ready_for_reboot = TRUE
var/datum/discord_embed/embed = format_roundend_embed("<@&999008528595419278>")
send2roundend_webhook(embed)
SSplexora.roundended()
// monkestation end
standard_reboot()

Expand Down
59 changes: 48 additions & 11 deletions code/controllers/failsafe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,41 +68,72 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if(processing_interval > 0)
if(Master.processing && Master.iteration)
if (defcon > 1 && (!Master.stack_end_detector || !Master.stack_end_detector.check()))

to_chat(GLOB.admins, span_boldannounce("ERROR: The Master Controller code stack has exited unexpectedly, Restarting..."))
// Monkestation edit: start - plexora
var/msg = "ERROR: The Master Controller code stack has exited unexpectedly, Restarting..."
to_chat(GLOB.admins, span_boldannounce(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
defcon = 0
var/rtn = Recreate_MC()
if(rtn > 0)
master_iteration = 0
to_chat(GLOB.admins, span_adminnotice("MC restarted successfully"))
// Monkestation edit: start - plexora
msg = "MC restarted successfully"
to_chat(GLOB.admins, span_adminnotice(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
else if(rtn < 0)
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(GLOB.admins, span_boldannounce("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."))
// Monkestation edit: start - plexora
msg = "ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."
to_chat(GLOB.admins, span_boldannounce(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
// Check if processing is done yet.
if(Master.iteration == master_iteration)
switch(defcon)
if(4,5)
--defcon

if(3)
message_admins(span_adminnotice("Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks."))
// Monkestation edit: start - plexora
var/msg = "Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks."
message_admins(span_adminnotice(msg))
SSplexora.mc_alert(msg)
// Monkestation edit: end
--defcon

if(2)
to_chat(GLOB.admins, span_boldannounce("Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks."))
// Monkestation edit: start - plexora
var/msg = "Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks."
to_chat(GLOB.admins, span_boldannounce(msg))
SSplexora.mc_alert(msg)
// Monkestation edit: end
--defcon

if(1)
to_chat(GLOB.admins, span_boldannounce("Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting..."))
// Monkestation edit: start - plexora
var/msg = "Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting..."
to_chat(GLOB.admins, span_boldannounce(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
--defcon
var/rtn = Recreate_MC()
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(GLOB.admins, span_adminnotice("MC restarted successfully"))
// Monkestation edit: start - plexora
msg = "MC restarted successfully"
to_chat(GLOB.admins, span_adminnotice(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
else if(rtn < 0)
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(GLOB.admins, span_boldannounce("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."))
// Monkestation edit: start - plexora
msg = "ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."
to_chat(GLOB.admins, span_boldannounce(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
//no need to handle that specially when defcon 0 can handle it

Expand All @@ -111,7 +142,11 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(GLOB.admins, span_adminnotice("MC restarted successfully"))
// Monkestation edit: start - plexora
var/msg = "MC restarted successfully"
to_chat(GLOB.admins, span_adminnotice(msg))
SSplexora.mc_alert(msg, defcon)
// Monkestation edit: end
else
defcon = min(defcon + 1,5)
master_iteration = Master.iteration
Expand Down Expand Up @@ -156,7 +191,9 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if (. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, FALSE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, span_adminnotice("MC successfully recreated after recovering all subsystems!"))
var/msg = "MC successfully recreated after recovering all subsystems!"
to_chat(GLOB.admins, span_adminnotice(msg))
SSplexora.mc_alert(msg, Failsafe.defcon)
else
message_admins(span_boldannounce("Failed to create new MC!"))

Expand Down
9 changes: 7 additions & 2 deletions code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ GLOBAL_REAL(Master, /datum/controller/master)
// because who knows how long we took for initializations, and whatever.
SSticker.SetTimeLeft(CONFIG_GET(number/lobby_countdown) * 10) // monkestation edit

SSplexora.serverinitdone(time) // Monkestation edit - plexora

if(world.system_type == MS_WINDOWS && CONFIG_GET(flag/toast_notification_on_init) && !length(GLOB.clients))
world.shelleo("start /min powershell -ExecutionPolicy Bypass -File tools/initToast/initToast.ps1 -name \"[world.name]\" -icon %CD%\\icons\\ui_icons\\common\\tg_16.png -port [world.port]")
Expand Down Expand Up @@ -390,8 +391,12 @@ GLOBAL_REAL(Master, /datum/controller/master)
if (rtn >= MC_LOOP_RTN_GRACEFUL_EXIT || processing < 0)
return //this was suppose to happen.
//loop ended, restart the mc
log_game("MC crashed or runtimed, restarting")
message_admins("MC crashed or runtimed, restarting")
// Monkestation edit: start - plexora
var/msg = "MC crashed or runtimed, restarting"
log_game(msg)
message_admins(msg)
SSplexora.mc_alert(msg)
// Monkestation edit: end
var/rtn2 = Recreate_MC()
if (rtn2 <= 0)
log_game("Failed to recreate MC (Error code: [rtn2]), it's up to the failsafe now")
Expand Down
5 changes: 5 additions & 0 deletions code/datums/http.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

var/_raw_response

/datum/http_request/New(...)
. = ..()
if(length(args))
src.prepare(arglist(args))

/datum/http_request/proc/prepare(method, url, body = "", list/headers, output_file)
if (!length(headers))
headers = ""
Expand Down
16 changes: 13 additions & 3 deletions code/datums/world_topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
if (input["format"] == "json")
. = list("error" = .)
else
. = Run(input)
// Monkestation edit start
if (input["json"])
. = Run(input + json_decode(input["json"]))
else
. = Run(input)
// Monkestation edit end
if (input["format"] == "json")
. = json_encode(.)
else if(islist(.))
Expand Down Expand Up @@ -234,8 +239,13 @@
.["bunkered"] = CONFIG_GET(flag/panic_bunker) || FALSE
.["interviews"] = CONFIG_GET(flag/panic_bunker_interview) || FALSE
if(SSshuttle?.emergency)
.["shuttle_mode"] = SSshuttle.emergency.mode
// monkestation start: move comments, add emergency reason
// Shuttle status, see /__DEFINES/stat.dm
.["shuttle_timer"] = SSshuttle.emergency.timeLeft()
.["shuttle_mode"] = SSshuttle.emergency.mode
// Shuttle timer, in seconds
.["shuttle_timer"] = SSshuttle.emergency.timeLeft()
// Shuttle reason
.["shuttle_emergency_reason"] = SSticker.emergency_reason
// monkestation end


1 change: 1 addition & 0 deletions code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ GLOBAL_VAR(tracy_log)
log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools")
message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools")
to_chat(world, span_boldannounce("Rebooting World immediately due to host request."))
SSplexora.Shutdown(TRUE, usr ? key_name(usr) : null) // Monkestation edit: plexora
else
to_chat(world, span_boldannounce("Rebooting world..."))
Master.Shutdown() //run SS shutdowns
Expand Down
21 changes: 21 additions & 0 deletions code/modules/admin/sql_ban_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,27 @@
var/msg = "has created a [isnull(duration) ? "permanent" : "temporary [time_message]"] [applies_to_admins ? "admin " : ""][is_server_ban ? "server ban" : "role ban from [roles_to_ban.len] roles"] for [target]."
log_admin_private("[kn] [msg][is_server_ban ? "" : " Roles: [roles_to_ban.Join(", ")]"] Reason: [reason]")
message_admins("[kna] [msg][is_server_ban ? "" : " Roles: [roles_to_ban.Join("\n")]"]\nReason: [reason]")
// MONKESTATION EDIT: START - Plexora
// Mock player just in case they disconnect and we lose their preferences
var/datum/client_interface/mock_player = new(player_key)
mock_player.prefs = new /datum/preferences(mock_player)

var/list/plexora_ban = list(
"ckey" = player_ckey,
"roles" = roles_to_ban,
"expiration_time" = duration,
"expiration_interval" = interval,
"reason" = reason,
"admin_ckey" = admin_ckey,
"admin_key_name" = key_name(usr),
"round_id" = GLOB.round_id,
"round_timer" = ROUND_TIME(),
"world_time" = world.time,
)

plexora_ban["total_playtime"] = mock_player.get_exp_living()
SSplexora.new_ban(plexora_ban)
// MONKESTATION EDIT: END
if(applies_to_admins)
send2adminchat("BAN ALERT","[kn] [msg]")
if(player_ckey)
Expand Down
21 changes: 21 additions & 0 deletions code/modules/admin/sql_message_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,27 @@
log_admin_private(pm)
message_admins("[header]:<br>[text]")
admin_ticket_log(target_ckey, "<font color='blue'>[header]</font><br>[text]")
// Monkestation edit start - plexora
var/datum/client_interface/mock_player = new(target_ckey)
mock_player.prefs = new /datum/preferences(mock_player)

var/list/plexora_note = list(
"ckey" = target_ckey,
"type" = type,
"text" = text,
"secret" = secret,
"expiration_time" = expiry || null,
"note_severity" = note_severity,
"admin_ckey" = admin_ckey,
"admin_key_name" = key_name(usr),
"round_id" = GLOB.round_id,
"round_timer" = ROUND_TIME(),
"world_time" = world.time,
)

plexora_note["total_playtime"] = mock_player.get_exp_living()
SSplexora.new_note(plexora_note)
// Monkestation edit end
if(browse)
browse_messages("[type]")
else
Expand Down
32 changes: 28 additions & 4 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// monkestation start
#define CHECK_AHELP_ACTIVE\
if(state != AHELP_ACTIVE) { \
return;\
};
// monkestation end

/// Client var used for returning the ahelp verb
/client/var/adminhelptimerid = 0
/// Client var used for tracking the ticket the (usually) not-admin client is dealing with
Expand Down Expand Up @@ -119,6 +126,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
C.current_ticket.initiator = C
C.current_ticket.AddInteraction("Client reconnected.")
SSblackbox.LogAhelp(C.current_ticket.id, "Reconnected", "Client reconnected", C.ckey)
SSplexora.aticket_connection(C.current_ticket, FALSE) // monkestation edit: PLEXORA

//Dissasociate ticket
/datum/admin_help_tickets/proc/ClientLogout(client/C)
Expand All @@ -128,6 +136,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
//Gotta async this cause clients only logout on destroy, and sleeping in destroy is disgusting
INVOKE_ASYNC(SSblackbox, TYPE_PROC_REF(/datum/controller/subsystem/blackbox, LogAhelp), T.id, "Disconnected", "Client disconnected", C.ckey)
T.initiator = null
SSplexora.aticket_connection(C.current_ticket) // monkestation edit: PLEXORA

//Get a ticket given a ckey
/datum/admin_help_tickets/proc/CKey2ActiveTicket(ckey)
Expand Down Expand Up @@ -239,7 +248,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(is_bwoink)
AddInteraction("<font color='blue'>[key_name_admin(usr)] PM'd [LinkedReplyName()]</font>", player_message = "<font color='blue'>[key_name_admin(usr, include_name = FALSE)] PM'd [LinkedReplyName()]</font>")
message_admins("<font color='blue'>Ticket [TicketHref("#[id]")] created</font>")
SSplexora.aticket_new(src, msg_raw, is_bwoink, urgent, usr.ckey) // monkestation edit: PLEXORA
else
SSplexora.aticket_new(src, msg_raw, is_bwoink, urgent) // monkestation edit: PLEXORA
MessageNoRecipient(msg_raw, urgent)
send_message_to_tgs(msg, urgent)
GLOB.ahelp_tickets.active_tickets += src
Expand Down Expand Up @@ -463,6 +474,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
log_admin_private(msg)
SSblackbox.LogAhelp(id, "Reopened", "Reopened by [usr.key]", usr.ckey)
SSblackbox.record_feedback("tally", "ahelp_stats", 1, "reopened")
SSplexora.aticket_reopened(src, usr.ckey) // monkestation edit: PLEXORA
TicketPanel() //can only be done from here, so refresh it

//private
Expand Down Expand Up @@ -504,6 +516,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)

AddInteraction("<font color='green'>Resolved by [key_name].</font>", player_message = "<font color='green'>Ticket resolved!</font>")
to_chat(initiator, span_adminhelp("Your ticket has been resolved by an admin. The Adminhelp verb will be returned to you shortly."), confidential = TRUE)

if(!silent)
SSblackbox.record_feedback("tally", "ahelp_stats", 1, "resolved")
var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name]"
Expand Down Expand Up @@ -531,6 +544,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
log_admin_private(msg)
AddInteraction("Rejected by [key_name].", player_message = "Ticket rejected!")
SSblackbox.LogAhelp(id, "Rejected", "Rejected by [usr.key]", null, usr.ckey)

Close(silent = TRUE)

//Resolve ticket with IC Issue message
Expand Down Expand Up @@ -630,18 +644,27 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
TicketPanel()
if("retitle")
Retitle()
if("reject")
Reject()
if("reply")
usr.client.cmd_ahelp_reply(initiator)
if("reopen")
CHECK_AHELP_ACTIVE
Reopen()
if("reject")
CHECK_AHELP_ACTIVE
SSplexora.aticket_closed(src, usr.ckey, AHELP_CLOSETYPE_REJECT)
Reject()
if("icissue")
CHECK_AHELP_ACTIVE
SSplexora.aticket_closed(src, usr.ckey, AHELP_CLOSETYPE_RESOLVE, AHELP_CLOSEREASON_IC)
ICIssue()
if("close")
CHECK_AHELP_ACTIVE
SSplexora.aticket_closed(src, usr.ckey, AHELP_CLOSETYPE_CLOSE)
Close()
if("resolve")
CHECK_AHELP_ACTIVE
SSplexora.aticket_closed(src, usr.ckey, AHELP_CLOSETYPE_RESOLVE)
Resolve()
if("reopen")
Reopen()

/datum/admin_help/proc/player_ticket_panel()
var/list/dat = list("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Player Ticket</title></head>")
Expand Down Expand Up @@ -1133,3 +1156,4 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
#undef WEBHOOK_URGENT
#undef WEBHOOK_NONE
#undef WEBHOOK_NON_URGENT
#undef CHECK_AHELP_ACTIVE
Loading
Loading