diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 215e816f76e..d08823475b0 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -60,8 +60,13 @@
var/respawn = 1
var/guest_jobban = 1
var/usewhitelist = 0
- var/mods_are_mentors = 0
var/kick_inactive = 0 //force disconnect for inactive players
+ var/show_mods = 0
+ var/show_mentors = 0
+ var/mods_can_tempban = 0
+ var/mods_can_job_tempban = 0
+ var/mod_tempban_max = 1440
+ var/mod_job_tempban_max = 1440
var/load_jobs_from_txt = 0
var/ToRban = 0
var/automute_on = 0 //enables automuting/spam prevention
@@ -301,9 +306,6 @@
if ("log_runtime")
config.log_runtime = 1
- if ("mentors")
- config.mods_are_mentors = 1
-
if("allow_admin_ooccolor")
config.allow_admin_ooccolor = 1
@@ -451,6 +453,24 @@
if("kick_inactive")
config.kick_inactive = 1
+ if("show_mods")
+ config.show_mods = 1
+
+ if("show_mentors")
+ config.show_mentors = 1
+
+ if("mods_can_tempban")
+ config.mods_can_tempban = 1
+
+ if("mods_can_job_tempban")
+ config.mods_can_job_tempban = 1
+
+ if("mod_tempban_max")
+ config.mod_tempban_max = text2num(value)
+
+ if("mod_job_tempban_max")
+ config.mod_job_tempban_max = text2num(value)
+
if("load_jobs_from_txt")
load_jobs_from_txt = 1
diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm
index d877001fad3..e5655caaeab 100644
--- a/code/game/verbs/who.dm
+++ b/code/game/verbs/who.dm
@@ -48,8 +48,10 @@
var/msg = ""
var/modmsg = ""
+ var/mentmsg = ""
var/num_mods_online = 0
var/num_admins_online = 0
+ var/num_mentors_online = 0
if(holder)
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights)) //Used to determine who shows up in admin rows
@@ -74,7 +76,7 @@
msg += "\n"
num_admins_online++
- else if(R_MOD & C.holder.rights || R_MENTOR & C.holder.rights) //Who shows up in mod/mentor rows.
+ else if(R_MOD & C.holder.rights) //Who shows up in mod/mentor rows.
modmsg += "\t[C] is a [C.holder.rank]"
if(isobserver(C.mob))
@@ -89,17 +91,41 @@
modmsg += "\n"
num_mods_online++
+ else if(R_MENTOR & C.holder.rights)
+ mentmsg += "\t[C] is a [C.holder.rank]"
+ if(isobserver(C.mob))
+ mentmsg += " - Observing"
+ else if(istype(C.mob,/mob/new_player))
+ mentmsg += " - Lobby"
+ else
+ mentmsg += " - Playing"
+
+ if(C.is_afk())
+ mentmsg += " (AFK)"
+ mentmsg += "\n"
+ num_mentors_online++
+
else
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights))
if(!C.holder.fakekey)
msg += "\t[C] is a [C.holder.rank]\n"
num_admins_online++
- else if (R_MOD & C.holder.rights || R_MENTOR & C.holder.rights)
+ else if (R_MOD & C.holder.rights)
modmsg += "\t[C] is a [C.holder.rank]\n"
num_mods_online++
+ else if (R_MENTOR & C.holder.rights)
+ mentmsg += "\t[C] is a [C.holder.rank]\n"
+ num_mentors_online++
+
if(config.admin_irc)
src << "Adminhelps are also sent to IRC. If no admins are available in game try anyway and an admin on IRC may see it and respond."
- msg = "Current Admins ([num_admins_online]):\n" + msg + "\n Current [config.mods_are_mentors ? "Mentors" : "Moderators"]([num_mods_online]):\n" + modmsg
+ msg = "Current Admins ([num_admins_online]):\n" + msg
+
+ if(config.show_mods)
+ msg += "\n Current Moderators ([num_mods_online]):\n" + modmsg
+
+ if(config.show_mentors)
+ msg += "\n Current Mentors ([num_mentors_online]):\n" + mentmsg
src << msg
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 564188ac18c..3b701b27da4 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -660,7 +660,13 @@
//JOBBAN'S INNARDS
else if(href_list["jobban3"])
- if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
+ if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN,0))
+ usr << "You do not have the appropriate permissions to add job bans!"
+ return
+
+ if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !config.mods_can_job_tempban) // If mod and tempban disabled
+ usr << "Mod jobbanning is disabled!"
+ return
var/mob/M = locate(href_list["jobban4"])
if(!ismob(M))
@@ -735,13 +741,18 @@
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
- if(!check_rights(R_MOD,0) && !check_rights(R_BAN)) return
+ if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
+ usr << " You Cannot issue temporary job-bans!"
+ return
if(config.ban_legacy_system)
usr << "\red Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban."
return
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
return
+ if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_job_tempban_max)
+ usr << " Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!"
+ return
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
if(!reason)
return
@@ -850,7 +861,13 @@
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
else if(href_list["newban"])
- if(!check_rights(R_MOD,0) && !check_rights(R_BAN)) return
+ if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
+ usr << "You do not have the appropriate permissions to add bans!"
+ return
+
+ if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !config.mods_can_job_tempban) // If mod and tempban disabled
+ usr << "Mod jobbanning is disabled!"
+ return
var/mob/M = locate(href_list["newban"])
if(!ismob(M)) return
@@ -862,6 +879,9 @@
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
return
+ if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_tempban_max)
+ usr << "Moderators can only job tempban up to [config.mod_tempban_max] minutes!"
+ return
if(mins >= 525600) mins = 525599
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
if(!reason)
diff --git a/code/world.dm b/code/world.dm
index f67d6711ac7..8737f69b0dc 100644
--- a/code/world.dm
+++ b/code/world.dm
@@ -284,6 +284,7 @@ var/world_topic_spam_protect_time = world.timeofday
/hook/startup/proc/loadMods()
world.load_mods()
+ world.load_mentors() // no need to write another hook.
return 1
/world/proc/load_mods()
@@ -301,7 +302,26 @@ var/world_topic_spam_protect_time = world.timeofday
continue
var/title = "Moderator"
- if(config.mods_are_mentors) title = "Mentor"
+ var/rights = admin_ranks[title]
+
+ var/ckey = copytext(line, 1, length(line)+1)
+ var/datum/admins/D = new /datum/admins(title, rights, ckey)
+ D.associate(directory[ckey])
+
+/world/proc/load_mentors()
+ if(config.admin_legacy_system)
+ var/text = file2text("config/mentors.txt")
+ if (!text)
+ error("Failed to load config/mentors.txt")
+ else
+ var/list/lines = text2list(text, "\n")
+ for(var/line in lines)
+ if (!line)
+ continue
+ if (copytext(line, 1, 2) == ";")
+ continue
+
+ var/title = "Mentor"
var/rights = admin_ranks[title]
var/ckey = copytext(line, 1, length(line)+1)
diff --git a/config/example/config.txt b/config/example/config.txt
index 364f4fc6643..382dab74ac0 100644
--- a/config/example/config.txt
+++ b/config/example/config.txt
@@ -73,10 +73,23 @@ LOG_PDA
## disconnect players who did nothing during 10 minutes
# KICK_INACTIVE
-## Use Mentors instead of Moderators. Mentors are designed with the idea that
-###they help in pushing new people to be better at roleplay. If you uncomment
-###this it will reduce the rights that your mods have.
-#MENTORS
+##Show mods on staffwho
+SHOW_MODS
+
+##Show mentors on staffwho
+SHOW_MENTORS
+
+## Chooses whether mods have the ability to tempban or not
+MODS_CAN_TEMPBAN
+
+## Chooses whether mods have the ability to issue tempbans for jobs or not
+MODS_CAN_JOB_TEMPBAN
+
+## Maximum mod tempban duration (in minutes)
+MOD_TEMPBAN_MAX 1440
+
+## Maximum mod job tempban duration (in minutes)
+MOD_JOB_TEMPBAN_MAX 1440
## probablities for game modes chosen in "secret" and "random" modes
diff --git a/config/example/mentors.txt b/config/example/mentors.txt
new file mode 100644
index 00000000000..afc3e8c920d
--- /dev/null
+++ b/config/example/mentors.txt
@@ -0,0 +1,3 @@
+; just add the ckey (lowercase) of every mentor on a separate line
+; lines starting with ; are comments and will be ignored
+