From db072d7f4a501da720854358a11ae1a775fe619f Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Fri, 2 May 2014 21:31:30 -0500 Subject: [PATCH] Adds Mentors. Adds a config option MENTORS which sets the variable config.mods_are_mentors Adds a rights level of R_MENTOR which gets msay, private message, aghost, notes, and a new proc for checking for new players (requires database support). If the confic option for mentors is set then the ckeys listed in moderators.txt file will instead be set as mentors, you can still make moderators by adding them in admins.txt staffwho will show Mentors instead of Moderators as the heading above the listing of non-admins. Also: Players now get a message gently reminding them to click the name of the staff member to reply instead of ahelping over and over. Conflicts: code/game/verbs/who.dm code/modules/admin/admin_verbs.dm code/modules/admin/verbs/deadsay.dm config/example/config.txt --- code/controllers/configuration.dm | 3 +++ code/modules/admin/admin_verbs.dm | 3 ++- code/modules/admin/verbs/adminsay.dm | 8 ++++++-- code/modules/admin/verbs/deadsay.dm | 14 +++++++++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index bc573f19c30..851cf505817 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -252,6 +252,9 @@ if ("mentors") config.mods_are_mentors = 1 + if ("mentors") + config.mods_are_mentors = 1 + if("allow_admin_ooccolor") config.allow_admin_ooccolor = 1 diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index ab75c250ba9..571871cd7a0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -234,6 +234,7 @@ var/list/admin_verbs_mod = list( /client/proc/player_panel_new ) + var/list/admin_verbs_mentor = list( /client/proc/cmd_admin_pm_context, /client/proc/cmd_admin_pm_panel, @@ -241,7 +242,7 @@ var/list/admin_verbs_mentor = list( /client/proc/admin_ghost, /client/proc/cmd_mod_say, /datum/admins/proc/show_player_info, - /client/proc/dsay, +// /client/proc/dsay, /client/proc/cmd_admin_subtle_message ) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 36a9f820213..11c595d91b1 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -32,6 +32,10 @@ var/color = "mod" if (check_rights(R_ADMIN,0)) color = "adminmod" + + var/channel = "MOD:" + if(config.mods_are_mentors) + channel = "MENTOR:" for(var/client/C in admins) - if((R_ADMIN|R_MOD) & C.holder.rights) - C << "MOD: [key_name(src,1)] (JMP): [msg]" + if((R_ADMIN|R_MOD|R_MENTOR) & C.holder.rights) + C << "[channel] [key_name(src,1)] (JMP): [msg]" diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 7176767fae9..9fed9934e76 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -18,6 +18,18 @@ if (src.handle_spam_prevention(msg,MUTE_DEADCHAT)) return + + var/stafftype = null + + if (src.holder.rights & R_MOD) + stafftype = "MOD" + + if (src.holder.rights & R_MENTOR) + stafftype = "MENTOR" + + if (src.holder.rights & R_ADMIN) + stafftype = "ADMIN" + msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN) log_admin("[key_name(src)] : [msg]") @@ -36,4 +48,4 @@ else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // show the message to regular ghosts who have deadchat toggled on M.show_message(rendered, 2) - feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! \ No newline at end of file + feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!