mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 17:42:26 +00:00
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.
This commit is contained in:
@@ -41,6 +41,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if("sound","sounds") rights |= R_SOUNDS
|
||||
if("spawn","create") rights |= R_SPAWN
|
||||
if("mod") rights |= R_MOD
|
||||
if("mentor") rights |= R_MENTOR
|
||||
|
||||
admin_ranks[rank] = rights
|
||||
previous_rights = rights
|
||||
@@ -52,7 +53,6 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
testing(msg)
|
||||
#endif
|
||||
|
||||
|
||||
/hook/startup/proc/loadAdmins()
|
||||
load_admins()
|
||||
return 1
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
||||
var/list/admin_verbs_default = list(
|
||||
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
|
||||
// /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
|
||||
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
||||
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
|
||||
/client/proc/hide_verbs, /*hides all our adminverbs*/
|
||||
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
|
||||
/client/proc/check_antagonists /*shows all antags*/
|
||||
/client/proc/check_antagonists, /*shows all antags*/
|
||||
/client/proc/cmd_mentor_check_new_players
|
||||
// /client/proc/deadchat /*toggles deadchat on/off*/
|
||||
)
|
||||
var/list/admin_verbs_admin = list(
|
||||
@@ -245,6 +246,18 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/jobbans,
|
||||
/client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/
|
||||
)
|
||||
|
||||
var/list/admin_verbs_mentor = list(
|
||||
/client/proc/cmd_admin_pm_context,
|
||||
/client/proc/cmd_admin_pm_panel,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/admin_ghost,
|
||||
/client/proc/cmd_mod_say,
|
||||
/datum/admins/proc/show_player_info,
|
||||
// /client/proc/dsay,
|
||||
/client/proc/cmd_admin_subtle_message
|
||||
)
|
||||
|
||||
/client/proc/add_admin_verbs()
|
||||
if(holder)
|
||||
verbs += admin_verbs_default
|
||||
@@ -261,6 +274,7 @@ var/list/admin_verbs_mod = list(
|
||||
if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds
|
||||
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
|
||||
if(holder.rights & R_MOD) verbs += admin_verbs_mod
|
||||
if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
verbs.Remove(
|
||||
|
||||
@@ -18,6 +18,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
|
||||
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
|
||||
|
||||
/**src.verbs -= /client/verb/adminhelp
|
||||
|
||||
spawn(1200)
|
||||
@@ -31,6 +33,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(!msg) return
|
||||
var/original_msg = msg
|
||||
|
||||
|
||||
|
||||
//explode the input msg into a list
|
||||
var/list/msglist = text2list(msg, " ")
|
||||
|
||||
|
||||
@@ -94,7 +94,10 @@
|
||||
var/recieve_message = ""
|
||||
|
||||
if(holder && !C.holder)
|
||||
recieve_message = "<font color='[recieve_color]' size='4'><b>-- Administrator private message --</b></font>\n"
|
||||
recieve_message = "<font color='[recieve_color]' size='3'><b>-- Click the [recieve_pm_type]'s name to reply --</b></font>\n"
|
||||
if(C.adminhelped)
|
||||
C << recieve_message
|
||||
C.adminhelped = 0
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
@@ -180,5 +183,5 @@
|
||||
//check client/X is an admin and isn't the sender or recipient
|
||||
if(X == C || X == src)
|
||||
continue
|
||||
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
|
||||
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & (R_MOD|R_MENTOR)) )
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
set name = "Msay"
|
||||
set hidden = 1
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD)) return
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR)) return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
log_admin("MOD: [key_name(src)] : [msg]")
|
||||
@@ -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 << "<span class='[color]'><span class='prefix'>MOD:</span> <EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
if((R_ADMIN|R_MOD|R_MENTOR) & C.holder.rights)
|
||||
C << "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
if (src.holder.rights & R_MOD)
|
||||
stafftype = "MOD"
|
||||
|
||||
if (src.holder.rights & R_MENTOR)
|
||||
stafftype = "MENTOR"
|
||||
|
||||
if (src.holder.rights & R_ADMIN)
|
||||
stafftype = "ADMIN"
|
||||
|
||||
@@ -44,4 +47,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!
|
||||
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -65,6 +65,37 @@
|
||||
message_admins("\blue \bold SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]", 1)
|
||||
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_mentor_check_new_players() //Allows mentors / admins to determine who the newer players are.
|
||||
set category = "Admin"
|
||||
set name = "Check new Players"
|
||||
if(!holder)
|
||||
src << "Only staff members may use this command."
|
||||
|
||||
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
|
||||
|
||||
if(age == "All")
|
||||
age = 9999999
|
||||
else
|
||||
age = text2num(age)
|
||||
|
||||
var/missing_ages = 0
|
||||
var/msg = ""
|
||||
for(var/client/C in clients)
|
||||
if(C.player_age == "Requires database")
|
||||
missing_ages = 1
|
||||
continue
|
||||
if(C.player_age < age)
|
||||
msg += "[key_name_admin(C)]: account is [C.player_age] days old<br>"
|
||||
|
||||
if(missing_ages)
|
||||
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present"
|
||||
|
||||
if(msg != "")
|
||||
src << browse(msg, "window=Player_age_check")
|
||||
else
|
||||
src << "No matches for that age range found."
|
||||
|
||||
|
||||
/client/proc/cmd_admin_world_narrate() // Allows administrators to fluff events a little easier -- TLE
|
||||
set category = "Special Verbs"
|
||||
set name = "Global Narrate"
|
||||
|
||||
Reference in New Issue
Block a user