Replaces dibs with Bay's ticket system. (#3984)

A user ahelping creates a ticket. Any further ahelps while that ticket is open will go to that ticket (and either adminhelp or pm an admin assigned to the ticket, if one has taken it).
A user can close their own ticket up until an admin takes it.
Admins can take tickets either manually or just by replying to the PM.
An admin taking a ticket notifies other admins.
If another admin attempts to take or respond to an assigned ticket, they receive a notification asking if they would like to join the ticket or cancel (any number of admins can join a ticket).
When an admin finishes with a ticket, they must close it -- both for logistics and closure for the user.
If there is an open ticket assigned to an active admin, round end is automatically delayed (unassigned tickets or tickets assigned to disconnected or afk admins do not delay). Round end will automatically continue once all active tickets are closed.
Both staff and non-staff have access to a ticket panel listing tickets, their statuses, and their messages. Non-staff can only see their own tickets. This panel is optional and all features are available inline with chat.
This commit is contained in:
Mustafa Kalash
2018-03-02 21:54:39 +02:00
committed by Erki
parent 1473298d05
commit 511e9c4e22
14 changed files with 448 additions and 120 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
var/area = null
var/time_died_as_mouse = 0
var/adminhelped = 0
var/adminhelped = NOT_ADMINHELPED
///////////////
//SOUND STUFF//
+15 -1
View File
@@ -58,12 +58,22 @@
//Admin PM
if(href_list["priv_msg"])
var/client/C = locate(href_list["priv_msg"])
var/datum/ticket/ticket = locate(href_list["ticket"])
if(ismob(C)) //Old stuff can feed-in mobs instead of clients
var/mob/M = C
C = M.client
cmd_admin_pm(C,null)
cmd_admin_pm(C, null, ticket)
return
if(href_list["close_ticket"])
var/datum/ticket/ticket = locate(href_list["close_ticket"])
if(isnull(ticket))
return
ticket.close(src)
if(href_list["discord_msg"])
if(!holder && received_discord_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes
usr << "<span class='warning'>You are no longer able to use this, it's been more then 10 minutes since an admin on Discord has responded to you</span>"
@@ -225,6 +235,9 @@
..() //redirect to hsrc.()
/proc/client_by_ckey(ckey)
return directory[ckey]
/client/proc/handle_spam_prevention(var/message, var/mute_type)
if (config.automute_on && !holder && length(message))
if (last_message_time)
@@ -383,6 +396,7 @@
//DISCONNECT//
//////////////
/client/Del()
ticket_panels -= src
if(holder)
holder.owner = null
admins -= src