Adds mentors

Adds mentors
This commit is contained in:
lm40
2022-08-13 21:46:05 -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