Ahelp and Mhelp QOL (#24597)

* Bound ahelp/mhelp replies more tightly to their ticket.

* Hardened PMs further against missing data.

* Support expanding Discord notifications for ahelp/mhelp.

Functionality changes:
* Informs the user when their ticket is reopened.
* Informs other mentors/admins when tickets are converted.
* Discord messages now get a "Ticket 3, " or similar prefix.
  Not useful by itself, but will be with the following PR.

Code changes:
* When you create a ticket, you get the ticket object back.
* checkForTicket now allows you to fetch a ticket by number, and falls
  back to searching for open tickets if the ticket isn't found.
* Corrected and simplified the logic for adding PMs to tickets.
* Responses are now added through the ticket system, not the tickets
  directly.
This commit is contained in:
Charlie Nolan
2024-03-26 06:44:26 -07:00
committed by GitHub
parent b30890dd2a
commit e2f6212656
10 changed files with 95 additions and 62 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
for(var/client/C in GLOB.admins)
if(check_rights(R_ADMIN | R_MENTOR | R_MOD, 0, C.mob))
if(important || (C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS)))
to_chat(C, msg, MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
to_chat(C, msg, MESSAGE_TYPE_MENTORPM, confidential = TRUE)
if(important)
if(C.prefs?.sound & SOUND_MENTORHELP)
SEND_SOUND(C, sound('sound/effects/adminhelp.ogg'))