mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 19:14:15 +01:00
[MIRROR] Fixes an adminPM dead end eating replies (#1857)
* Fixes an adminPM dead end eating replies (#55127) If you tried to reply to an admin that had deadminned while you were typing you would get an error and your message was eaten. Now sends to MessageNoRecipient if theres an open ticket, or prints a warning and the message in chat if there isn't. * Fixes an adminPM dead end eating replies Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
This commit is contained in:
@@ -294,11 +294,17 @@
|
||||
INVOKE_ASYNC(src, .proc/popup_admin_pm, recipient, msg)
|
||||
|
||||
else //neither are admins
|
||||
to_chat(src,
|
||||
type = MESSAGE_TYPE_ADMINPM,
|
||||
html = "<span class='danger'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>",
|
||||
confidential = TRUE)
|
||||
return
|
||||
if(!current_ticket)
|
||||
to_chat(src,
|
||||
type = MESSAGE_TYPE_ADMINPM,
|
||||
html = "<span class='danger'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>",
|
||||
confidential = TRUE)
|
||||
to_chat(src,
|
||||
type = MESSAGE_TYPE_ADMINPM,
|
||||
html = "<span class='danger'><b>Message not sent:</b></span><br>[msg]",
|
||||
confidential = TRUE)
|
||||
return
|
||||
current_ticket.MessageNoRecipient(msg)
|
||||
|
||||
if(external)
|
||||
log_admin_private("PM: [key_name(src)]->External: [rawmsg]")
|
||||
|
||||
Reference in New Issue
Block a user