mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Ports ticket system overhaul from downstream (#17063)
* Ports ticket system overhaul from downstream * Various fixes * fixes * Update tickets.dm * Update tickets.dm * Update ticket.dm * Refactor --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -179,7 +179,6 @@
|
||||
|
||||
switch(href_list["_src_"])
|
||||
if("holder") hsrc = holder
|
||||
if("mentorholder") hsrc = (check_rights(R_ADMIN, 0) ? holder : mentorholder)
|
||||
if("usr") hsrc = mob
|
||||
if("prefs") return prefs.process_link(usr,href_list)
|
||||
if("vars") return view_var_Topic(href,href_list,hsrc)
|
||||
@@ -257,8 +256,7 @@
|
||||
initialize_commandbar_spy()
|
||||
tgui_panel = new(src, "browseroutput")
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogin(src)
|
||||
GLOB.mhelp_tickets.ClientLogin(src)
|
||||
GLOB.tickets.ClientLogin(src)
|
||||
|
||||
//Admin Authorisation
|
||||
holder = GLOB.admin_datums[ckey]
|
||||
@@ -266,10 +264,6 @@
|
||||
GLOB.admins += src
|
||||
holder.owner = src
|
||||
|
||||
mentorholder = mentor_datums[ckey]
|
||||
if (mentorholder)
|
||||
mentorholder.associate(GLOB.directory[ckey])
|
||||
|
||||
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = preferences_datums[ckey]
|
||||
if(prefs)
|
||||
@@ -374,8 +368,7 @@
|
||||
if (!QDELING(src))
|
||||
stack_trace("Client does not purport to be QDELING, this is going to cause bugs in other places!")
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogout(src)
|
||||
GLOB.mhelp_tickets.ClientLogout(src)
|
||||
GLOB.tickets.ClientLogout(src)
|
||||
|
||||
// Yes this is the same as what's found in qdel(). Yes it does need to be here
|
||||
// Get off my back
|
||||
@@ -387,9 +380,6 @@
|
||||
if(holder)
|
||||
holder.owner = null
|
||||
GLOB.admins -= src
|
||||
if (mentorholder)
|
||||
mentorholder.owner = null
|
||||
GLOB.mentors -= src
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
|
||||
|
||||
@@ -62,10 +62,12 @@
|
||||
var/modmsg = ""
|
||||
var/devmsg = ""
|
||||
var/eventMmsg = ""
|
||||
var/mentormsg = ""
|
||||
var/num_mods_online = 0
|
||||
var/num_admins_online = 0
|
||||
var/num_devs_online = 0
|
||||
var/num_event_managers_online = 0
|
||||
var/num_mentors_online = 0
|
||||
for(var/client/C in GLOB.admins) // VOREStation Edit - GLOB
|
||||
var/temp = ""
|
||||
var/category = R_ADMIN
|
||||
@@ -84,6 +86,9 @@
|
||||
else if(check_rights_for(C, R_STEALTH)) // event managers //VOREStation Edit: Retired Staff
|
||||
category = R_EVENT
|
||||
num_event_managers_online++
|
||||
else if(check_rights_for(C, R_MENTOR))
|
||||
category = R_MENTOR
|
||||
num_mentors_online++
|
||||
|
||||
temp += "\t[C] is a [C.holder.rank_names()]"
|
||||
if(holder)
|
||||
@@ -110,6 +115,8 @@
|
||||
devmsg += temp
|
||||
if(R_EVENT)
|
||||
eventMmsg += temp
|
||||
if(R_MENTOR)
|
||||
mentormsg += temp
|
||||
|
||||
msg = span_bold("Current Admins ([num_admins_online]):") + "\n" + msg
|
||||
|
||||
@@ -122,27 +129,8 @@
|
||||
if(CONFIG_GET(flag/show_event_managers))
|
||||
msg += "\n" + span_bold(" Current Miscellaneous ([num_event_managers_online]):") + "\n" + eventMmsg
|
||||
|
||||
var/num_mentors_online = 0
|
||||
var/mmsg = ""
|
||||
|
||||
for(var/client/C in GLOB.mentors)
|
||||
num_mentors_online++
|
||||
mmsg += "\t[C] is a Mentor"
|
||||
if(holder)
|
||||
if(isobserver(C.mob))
|
||||
mmsg += " - Observing"
|
||||
else if(isnewplayer(C.mob))
|
||||
mmsg += " - Lobby"
|
||||
else
|
||||
mmsg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
var/seconds = C.last_activity_seconds()
|
||||
mmsg += " (AFK - [round(seconds / 60)] minutes, [seconds % 60] seconds)"
|
||||
mmsg += "\n"
|
||||
|
||||
if(CONFIG_GET(flag/show_mentors))
|
||||
msg += "\n" + span_bold(" Current Mentors ([num_mentors_online]):") + "\n" + mmsg
|
||||
msg += "\n" + span_bold(" Current Mentors ([num_mentors_online]):") + "\n" + mentormsg
|
||||
|
||||
msg += "\n" + span_info("Adminhelps are also sent to Discord. If no admins are available in game try anyway and an admin on Discord may see it and respond.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user