diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index c659eec7fec..019c435bff9 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -304,6 +304,7 @@ proc/tg_list2text(list/list, glue=",") if(rights & R_SOUNDS) . += "[seperator]+SOUND" if(rights & R_SPAWN) . += "[seperator]+SPAWN" if(rights & R_MOD) . += "[seperator]+MODERATOR" + if(rights & R_MENTOR) . += "[seperator]+MENTOR" return . /proc/ui_style2icon(ui_style) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 8718f7dc12a..bc573f19c30 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -54,6 +54,7 @@ var/respawn = 0 var/guest_jobban = 1 var/usewhitelist = 0 + var/mods_are_mentors = 0 var/kick_inactive = 0 //force disconnect for inactive players var/load_jobs_from_txt = 0 var/ToRban = 0 @@ -248,6 +249,9 @@ if ("log_hrefs") config.log_hrefs = 1 + if ("mentors") + config.mods_are_mentors = 1 + if("allow_admin_ooccolor") config.allow_admin_ooccolor = 1 diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index 1608a81a748..a046f5c00eb 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -5,6 +5,7 @@ var/msg = "Current Players:\n" + var/list/Lines = list() if(holder) @@ -47,11 +48,12 @@ set name = "Adminwho" var/msg = "" + var/modmsg = "" var/num_mods_online = 0 var/num_admins_online = 0 if(holder) for(var/client/C in admins) - if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights)) + if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights)) msg += "\t[C] is a [C.holder.rank]" if(C.holder.fakekey) @@ -69,34 +71,9 @@ msg += "\n" num_admins_online++ - else - num_mods_online++ - else - for(var/client/C in admins) - if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights)) - if(!C.holder.fakekey) - msg += "\t[C] is a [C.holder.rank]\n" - num_admins_online++ - else - num_mods_online++ - msg = "Current Admins ([num_admins_online]):\n" + msg - msg += "There are also [num_mods_online] moderators online. To view online moderators, type 'modwho'\n" - src << msg - -/client/verb/modwho() - set category = "Admin" - set name = "Modwho" - - var/msg = "" - var/num_admins_online = 0 - var/num_mods_online = 0 - if(holder) - for(var/client/C in admins) - if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights)) - num_admins_online++ - else - msg += "\t[C] is a [C.holder.rank]" + else if(R_MOD & C.holder.rights || R_MENTOR & C.holder.rights) + modmsg += "\t[C] is a [C.holder.rank]" if(isobserver(C.mob)) msg += " - Observing" @@ -111,11 +88,14 @@ num_mods_online++ else for(var/client/C in admins) - if(R_ADMIN & C.holder.rights || !(R_MOD & C.holder.rights)) - num_admins_online++ - else - msg += "\t[C] is a [C.holder.rank]\n" - msg = "Current Moderators ([num_mods_online]):\n" + msg - msg += "There are also [num_admins_online] admins online. To view online admins, type 'adminwho'\n" + 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) + modmsg += "\t[C] is a [C.holder.rank]\n" + num_mods_online++ + + msg = "Current Admins ([num_admins_online]):\n" + msg + "\n Current [config.mods_are_mentors ? "Mentors" : "Moderators"]([num_mods_online]):\n" + modmsg src << msg diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 115fafba82d..a0815cc338b 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -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,6 +53,9 @@ var/list/admin_ranks = list() //list of all ranks with associated rights testing(msg) #endif +/hook/startup/proc/loadAdmins() + load_admins() + return 1 /proc/load_admins() //clear the datums references diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f0b071893fd..ab75c250ba9 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -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( @@ -232,6 +233,18 @@ var/list/admin_verbs_mod = list( /datum/admins/proc/show_player_info, /client/proc/player_panel_new ) + +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 @@ -248,6 +261,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( diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 870f7181453..50e187a38e7 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -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, " ") diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 28f5a4e46e7..91a5848f0ad 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -94,7 +94,10 @@ var/recieve_message = "" if(holder && !C.holder) - recieve_message = "-- Administrator private message --\n" + recieve_message = "-- Click the [recieve_pm_type]'s name to reply --\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 << "PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]: \blue [msg]" //inform X diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 4d55178b821..d62866ee55e 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -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
" + + 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" diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 87305a55f99..4b2800c3317 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -18,6 +18,7 @@ var/area = null var/time_died_as_mouse = null //when the client last died as a mouse + var/adminhelped = 0 /////////////// //SOUND STUFF// diff --git a/code/setup.dm b/code/setup.dm index 2da555207a8..0e011ef2584 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -657,8 +657,9 @@ var/list/TAGGERLOCATIONS = list("Disposals", #define R_SOUNDS 2048 #define R_SPAWN 4096 #define R_MOD 8192 +#define R_MENTOR 16384 -#define R_MAXPERMISSION 8192 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. +#define R_MAXPERMISSION 16384 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. #define R_HOST 65535 diff --git a/code/world.dm b/code/world.dm index 818c6583e10..6a6bcea9210 100644 --- a/code/world.dm +++ b/code/world.dm @@ -262,9 +262,12 @@ if (copytext(line, 1, 2) == ";") continue - var/rights = admin_ranks["Moderator"] + 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("Moderator", rights, ckey) + var/datum/admins/D = new /datum/admins(title, rights, ckey) D.associate(directory[ckey]) /world/proc/update_status() diff --git a/config-example/config.txt b/config-example/config.txt index bff57f0381e..2bdba41773d 100644 --- a/config-example/config.txt +++ b/config-example/config.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD:config-example/config.txt ## Server name: This appears at the top of the screen in-game. In this case it will read "tgstation: station_name" where station_name is the randomly generated name of the station for the round. Remove the # infront of SERVERNAME and replace 'tgstation' with the name of your choice # SERVERNAME tgstation @@ -252,4 +253,265 @@ RESPAWN_AS_MOMMI ## Media URL. ## The base URL of your media library. DO NOT ADD A SLASH AT THE END! ## NOTE that this must be publically-accessible. -#MEDIA_BASE_URL http://yoursite.tld/media \ No newline at end of file +#MEDIA_BASE_URL http://yoursite.tld/media +======= +## Server name: This appears at the top of the screen in-game. In this case it will read "tgstation: station_name" where station_name is the randomly generated name of the station for the round. Remove the # infront of SERVERNAME and replace 'tgstation' with the name of your choice +# SERVERNAME spacestation13 + +## Alert levels +ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced. +ALERT_BLUE_UPTO The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted. +ALERT_BLUE_DOWNTO The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed. +ALERT_RED_UPTO There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised. +ALERT_RED_DOWNTO The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised. +ALERT_DELTA The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill. + +## Add a # infront of this if you want to use the SQL based admin system, the legacy system uses admins.txt. You need to set up your database to use the SQL based system. +ADMIN_LEGACY_SYSTEM + +## Add a # infront of this if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system. +BAN_LEGACY_SYSTEM + +## Add a # here if you wish to use the setup where jobs have more access. This is intended for servers with low populations - where there are not enough players to fill all roles, so players need to do more than just one job. Also for servers where they don't want people to hide in their own departments. +JOBS_HAVE_MINIMAL_ACCESS + +## Unhash this entry to have certain jobs require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different jobs by editing +## the minimal_player_age variable in the files in folder /code/game/jobs/job/.. for the job you want to edit. Set minimal_player_age to 0 to disable age requirement for that job. +## REQUIRES the database set up to work. Keep it hashed if you don't have a database set up. +## NOTE: If you have just set-up the database keep this DISABLED, as player age is determined from the first time they connect to the server with the database up. If you just set it up, it means +## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days. +#USE_AGE_RESTRICTION_FOR_JOBS + +## Unhash this to use recursive explosions, keep it hashed to use circle explosions. Recursive explosions react to walls, airlocks and blast doors, making them look a lot cooler than the boring old circular explosions. They require more CPU and are (as of january 2013) experimental +#USE_RECURSIVE_EXPLOSIONS + +## log OOC channel +LOG_OOC + +## log client Say +LOG_SAY + +## log admin actions +LOG_ADMIN + +## log client access (logon/logoff) +LOG_ACCESS + +## log game actions (start of round, results, etc.) +LOG_GAME + +## log player votes +LOG_VOTE + +## log client Whisper +LOG_WHISPER + +## log emotes +LOG_EMOTE + +## log attack messages +LOG_ATTACK + +## log pda messages +LOG_PDA + +## log all Topic() calls (for use by coders in tracking down Topic issues) +# LOG_HREFS + +## log world.log and runtime errors to a file +# LOG_RUNTIME + +## log admin warning messages +##LOG_ADMINWARN ## Also duplicates a bunch of other messages. + +## sql switching +# SQL_ENABLED + +## 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 + + +## probablities for game modes chosen in "secret" and "random" modes +## +## default probablity is 1, increase to make that mode more likely to be picked +## set to 0 to disable that mode +PROBABILITY EXTENDED 1 +PROBABILITY MALFUNCTION 1 +PROBABILITY NUCLEAR 1 +PROBABILITY WIZARD 1 +PROBABILITY CHANGELING 1 +PROBABILITY CULT 1 +PROBABILITY EXTEND-A-TRAITORMONGOUS 6 + +## Hash out to disable random events during the round. +ALLOW_RANDOM_EVENTS + +## if amount of traitors scales or not +TRAITOR_SCALING + +## if objectives are disabled +#OBJECTIVES_DISABLED + +## make ERT's be only called by admins +#ERT_ADMIN_ONLY + +## If security is prohibited from being most antagonists +#PROTECT_ROLES_FROM_ANTAGONIST + +## Comment this out to stop admins being able to choose their personal ooccolor +ALLOW_ADMIN_OOCCOLOR + +## If metadata is supported +# ALLOW_METADATA + +## allow players to initiate a restart vote +ALLOW_VOTE_RESTART + +## allow players to initate a mode-change start +ALLOW_VOTE_MODE + +## min delay (deciseconds) between voting sessions (default 10 minutes) +VOTE_DELAY 6000 + +## time period (deciseconds) which voting session will last (default 1 minute) +VOTE_PERIOD 600 + +## autovote initial delay (deciseconds) before first automatic transfer vote call (default 180 minutes) +VOTE_AUTOTRANSFER_INITIAL 108000 + +##autovote delay (deciseconds) before sequential automatic transfer votes are called (default 60 minutes) +VOTE_AUTOTRANSFER_INTERVAL 36000 + +## Time left (seconds) before round start when automatic gamemote vote is called (default 100). +VOTE_AUTOGAMEMODE_TIMELEFT 100 + +## prevents dead players from voting or starting votes +#NO_DEAD_VOTE + +## players' votes default to "No vote" (otherwise, default to "No change") +DEFAULT_NO_VOTE + +## Allow ghosts to see antagonist through AntagHUD +ALLOW_ANTAG_HUD + +## If ghosts use antagHUD they are no longer allowed to join the round. +ANTAG_HUD_RESTRICTED + +## allow AI job +ALLOW_AI + + +## disable abandon mob +# NORESPAWN + +## disables calling del(src) on newmobs if they logout before spawnin in +# DONT_DEL_NEWMOB + +## set a hosted by name for unix platforms +HOSTEDBY yournamehere + +## Set to jobban "Guest-" accounts from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. +## Set to 1 to jobban them from those positions, set to 0 to allow them. +GUEST_JOBBAN + +## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting) +GUEST_BAN +## Set to jobban everyone who's key is not listed in data/whitelist.txt from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. +## Uncomment to 1 to jobban, leave commented out to allow these positions for everyone (but see GUEST_JOBBAN above and regular jobbans) +# USEWHITELIST + +## set a server location for world reboot. Don't include the byond://, just give the address and port. +#SERVER server.net:port + +## forum address +# FORUMURL http://example.com + +## Wiki address +# WIKIURL http://example.com + +## Ban appeals URL - usually for a forum or wherever people should go to contact your admins. +# BANAPPEALS http://example.com + +## In-game features +## spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard +# FEATURE_OBJECT_SPELL_SYSTEM + +##Toggle for having jobs load up from the .txt +# LOAD_JOBS_FROM_TXT + +##Remove the # mark infront of this to forbid admins from posssessing the singularity. +#FORBID_SINGULO_POSSESSION + +## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM. +## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off) +#POPUP_ADMIN_PM + +## Remove the # to allow special 'Easter-egg' events on special holidays such as seasonal holidays and stuff like 'Talk Like a Pirate Day' :3 YAARRR +ALLOW_HOLIDAYS +##Defines the ticklag for the world. 0.9 is the normal one, 0.5 is smoother. +TICKLAG 0.9 + +## Defines if Tick Compensation is used. It results in a minor slowdown of movement of all mobs, but attempts to result in a level movement speed across all ticks. Recommended if tickrate is lowered. +TICKCOMP 0 + +## Whether the server will talk to other processes through socket_talk +SOCKET_TALK 0 + +## Uncomment this to ban use of ToR +#TOR_BAN + +## Comment this out to disable automuting +#AUTOMUTE_ON + +## How long the delay is before the Away Mission gate opens. Default is half an hour. +GATEWAY_DELAY 18000 + +## Remove the # to give assistants maint access. +#ASSISTANT_MAINT + +## Remove the # to make rounds which end instantly (Rev, Wizard, Malf) to continue until the shuttle is called or the station is nuked. +## Malf and Rev will let the shuttle be called when the antags/protags are dead. +#CONTINUOUS_ROUNDS + +## Uncomment to restrict non-admins from using humanoid alien races +USEALIENWHITELIST + +## Comment this to unrestrict the number of alien players allowed in the round. The number represents the number of alien players for every human player. +#ALIEN_PLAYER_RATIO 0.2 +##Remove the # to let ghosts spin chairs +#GHOST_INTERACTION + +## Password used for authorizing ircbot and other external tools. +#COMMS_PASSWORD + +## Uncomment to enable sending data to the IRC bot. +#USE_IRC_BOT + +## Host where the IRC bot is hosted. Port 45678 needs to be open. +#IRC_BOT_HOST localhost + +## IRC channel to send information to. Leave blank to disable. +#MAIN_IRC #main + +## IRC channel to send adminhelps to. Leave blank to disable adminhelps-to-irc. +#ADMIN_IRC #admin + +## Path to the python2 executable on the system. Leave blank for default. +## Default is "python" on Windows, "/usr/bin/env python2" on UNIX. +#PYTHON_PATH + +## Uncomment to use the C library nudge instead of the python script. +## This helps security and stability on Linux, but you need to compile the library first. +#USE_LIB_NUDGE + +## Uncommen to allow ghosts to write in blood during Cult rounds. +ALLOW_CULT_GHOSTWRITER + +## Sets the minimum number of cultists needed for ghosts to write in blood. +REQ_CULT_GHOSTWRITER 6 +>>>>>>> 5acb764... Adds Mentors.:config/example/config.txt diff --git a/config/example/admin_ranks.txt b/config/example/admin_ranks.txt index 031b5f6b136..e02a56df044 100644 --- a/config/example/admin_ranks.txt +++ b/config/example/admin_ranks.txt @@ -29,6 +29,8 @@ Admin Observer Moderator +MOD +Mentor +MENTOR + Admin Candidate +ADMIN Trial Admin +@ +SPAWN +REJUV +VAREDIT +BAN Badmin +@ +POSSESS +BUILDMODE +SERVER +FUN @@ -40,4 +42,4 @@ Retired Admin +ADMIN +STEALTH Host +EVERYTHING Developer +DEBUG +VAREDIT +SERVER +SPAWN +REJUV +POSSESS +BUILDMODE -Dev Mod +@ +MOD \ No newline at end of file +Dev Mod +@ +MOD