Adds mentors

Adds mentors
This commit is contained in:
lm40
2022-08-12 22:29:15 -04:00
parent 568d89cb18
commit a7002ecdf1
14 changed files with 722 additions and 21 deletions
+16
View File
@@ -60,6 +60,14 @@
cmd_admin_pm(C,null)
return
if(href_list["mentorhelp_msg"])
var/client/C = locate(href_list["mentorhelp_msg"])
if(ismob(C))
var/mob/M = C
C = M.client
cmd_mentor_pm(C, null)
return
if(href_list["irc_msg"])
if(!holder && received_irc_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes
to_chat(usr, "<span class='warning'>You are no longer able to use this, it's been more then 10 minutes since an admin on IRC has responded to you</span>")
@@ -121,6 +129,7 @@
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)
@@ -183,6 +192,10 @@
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)
@@ -260,6 +273,9 @@
if(holder)
holder.owner = null
GLOB.admins -= src
if (mentorholder)
mentorholder.owner = null
GLOB.mentors -= src
GLOB.ahelp_tickets.ClientLogout(src)
GLOB.directory -= ckey
GLOB.clients -= src
+23 -1
View File
@@ -83,7 +83,7 @@
else if(check_rights(R_STEALTH, FALSE, C)) // event managers //VOREStation Edit: Retired Staff
category = R_EVENT
num_event_managers_online++
temp += "\t[C] is a [C.holder.rank]"
if(holder)
if(C.holder.fakekey)
@@ -121,6 +121,28 @@
if(config.show_event_managers)
msg += "\n<b> Current Miscellaneous ([num_event_managers_online]):</b>\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(istype(C.mob,/mob/new_player))
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.show_mentors)
msg += "\n<b> Current Mentors ([num_mentors_online]):</b>\n" + mmsg
msg += "\n<span class='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.</span>"
to_chat(src, msg)