/* Admin Trustee Tool 2.1b
*
* This plugin is a in-game / console tool that manages users, bans, logging, messaging, password protection for IP users and
* other miscellaneous features.
*
* Intended to run along side of amxbans, this plugin can be used to allow each server manager the ability to choose their own
* set of trusted admins with certain restrictions and or as a trial admin run before making them permanent in amxbans.
*
* With the ability to restrict certain commands based upon a users access, it will give options to allow/deny access to
* commands, see access levels below.
*
* For instance, if you want to add someone only to have access to use amx_chat and see admin chat but not allow to use kick, ban, slap/slay or etc.
*
* Admin hierarchy:
*
* rconadmin - Required flag ADMIN_RCON and rconadmin, gives full access to this plugin.
* useradmin - By giving useradmin account, this will allow certain users to have access to add, remove and edit user accounts.
* basic trustee - As stated a basic trustee account with access restrictions.
*
* Plugin features:
*
* 1) Mainly a console tool, a menu has been added for ease of use, however most behind the scenes commands will be run in
* console.
*
* 2) Restricts most but a few commands, see access levels below. Use command trustee_cmdblock <command> in amxx.cfg to
* add more.
*
* 3) Bans made by basic trustees are set to expire, rconadmin/useradmin can toggle any ban to perm via console "amx_trustee
* toggle <steamid/ip> banstate"
*
* 4) All users who do not have steam and IP only are required to set a password, they can use the admin_trustee_pw tool to
* set passwords/login.
*
* 5) Accounts can be auto set to expire for inactivity by use of command "admin_trustee toggle <steam/ip> expires", 4
* different toggle states as seen below.
*
* 6) View the userslist, bans and notices through the trustee menu or console tool amx_trustee userslist, amx_trustee banlist
* and amx_trustee msglist.
*
* 7) Under Ban Control/Bans on the trustee menu, automated reasons are setup for any given ban such as "Aimbot",
* "Aimbot+Wallhack" and etc.
*
*
Allows you to add DemoURLs to any given ban via "amx_trustee toggle <banned steam or ip> bandemo <http://URL>"
* 9) Through the menu, you can easily use the chat feature to send message to all admins.
* 10) Keeps tracks of last logins and clients who are banned that join.
* 11) Auto maintains and keeps organized the userslist, bans and logging files.
* 12) Allows you to make useradmin which in terms means an account manager besides rconadmin level.
* 13) Anyone with useradmin/rconadmin can add, remove and toggle certain accesses, however changes done by rconadmin
* cannot be overridden.
*
* 14) Clean menus and organized menu listings.
* 15) Anti console flood protection, when doing a list a time is set in increments to display bans, notices and messages. using
* "amx_trustee stoplist" will remove any listings from a console otherwise use trustee_menu for faster access.
*
* 16) Anti userslist corruption, changes being done to an account locks out anyone from using certain commands until the file
* changes have completed.
*
* 17) The ability to weed out logging levels so that only the people with access can see. See Logging Levels below.
* 1
WooHoo a random password generator for admin_trustee_pw
* 19) A cool banning feature, type amx_trustee iwantbandemo to see what it does.
* 20) And hopefully a nice help system so that even the simple minded can understand.
*
* Console commands:
*
* trustee_reload - Used to reload users, bans and notices. *rconadmin required.*
* admin_trustee - Console tool to add/remove users, change access levels and other misc commands, type admin_trustee in
* console for more usage.
* amx_trustee - Console tool to add/remove bans, messages, notices and other misc, type amx_trustee in console for more
* usage.
* admin_trustee_pw - Console tool to add/remove passwords, type admin_trustee_pw in console for more info.
* trustee_cmdblock - By default, most but a few commands are blocked starting with amx*, use this command via amxx.cfg to
* block other commands not starting with amx*
* trustee_menu - Opens up the trustee menu for ease of use, most commands are required you do them from console, the
* menu is limited in what can be done.
*
* CVAR settings for amxx.cfg:
*
* sv_admintrustee (Default: 1 | 0 = off) - Enables/Disabled plugin.
* trustee_amxbans_purge (Default: 1 | 0 = off) - Enable this if you want permanent bans made in this plugin to purge over to
* amxbans after a timeout period
* trustee_banpurge_time (Default: 2419200 = 1month) - The amount of time to hold a permanent ban before purging it
* over to amxbans.
* trustee_forcepassword (Default: 0) - Enable this if you want to force all users to use a password to login via
* admin_trustee_pw
* trustee_banexpire (Default: 432000 = 5days) - If ban is made by basic trustee, it will expire in this amount of time if not
* approved by rconadmin/useradmin.
* trustee_unbanlock (Default: 600 = 10minutes) - For basic trustee users, setting this option will restrict them from unbanning
* a user after a timeout period.
* trustee_notices (Default: 1 | 0 = off) - This is the logging, notice and messaging system.
* trustee_noticeexpire (Default: 2419200 = 1month) - This is the expiration time of a given message or log before it is
* removed.
* trustee_maxnotices (Default: 999 | 1 to 999) - Maximum amount of logs, messages and notices before they expire and are
* automatically removed.
*
* Access Levels:
*
* rconadmin - Allow/Deny full root control admin access. *rconadmin access required!*
* useradmin - Allow/Deny access to admin_trustee, make account manager. *rconadmin access required!*
* enabled - Enable/Disable trustee access. *useradmin/rconadmin req!*
* expires - Account expiration toggle (0-5): (0/Perm) (1-4/Weeks) (5/Auto disable if inactive for 2 weeks!)
* allaccess - Allow/Deny access to all commands available for ^"cei^" flags. rconadmin required!*
* chataccess - Allow/Deny access to amx_chat and view admin conversations.")
* slayaccess - Allow/Deny user to use amx_slay command!")
* muteaccess - Allow/Deny user to use amx_mute/amx_gag commands!")
* blindaccess - Allow/Deny user to use amx_blind access!")
* nickaccess - Allow/Deny user to use amx_nick command!")
* slapaccess - Allow/Deny user to use amx_slap command!")
* kickaccess - Allow/Deny user to use amx_kick command!")
* transferacc - Allow/Deny user to use amx_transfer command!")
* banaccess - Allow/Deny a trustee to ban a user from game play!" )
* editlock - Allow/Deny other user admin managers to edit this account. *rconadmin* over rides this!*
* newuser - Toggle whether or not to send new user information. *On by default when adding new trustees.*
*
* Logging Levels:
*
* Level 1: General notice to all default admin trustee level.
* Level 2: Message to useradmin and rconadmins only.
* Level 3: Message to rconadmin only.
* Level 4: Message level top priority notice above all, no delete, permanent!
*
* Setup:
*
* 1) Put admin_trustee.amxx in plugins.ini, some where near the top.
* 2) Edit amxx.cfg, add the CVAR settings as seen above some where in there or use the defaults.
* 3) Edit custommenuitems.cfg and add "amx_addmenuitem "Admin Trustee Menu" "trustee_menu" "hu" "admin_trustee.amxx""
* 4) After plugin is loaded, you will require ADMIN_RCON, go to the server and type in console "admin_trustee_pw rconpass"
* 5) This saves the master rcon password to file, this password is used to override other rconadmin settings.
* 6) As well, you should save the password for later use.
* 7) Next type in admin_trustee, amx_trustee, trustee_menu, amx_trustee msgsend and admin_trustee_pw for more usage
* help.
*
*
Anyone with ADMIN_RCON flag and knows the master password can authorize to have access and add themselves.
* 9) Add users using admin_trustee and toggle their access flags, look at any giving account by use of admin_trustee
* userslist/amx_trustee userslist.
*
* 10) Edit a file and name it "admin_trustee_newuser.ini". In this file you can set rules or new user information for newly added
* users.
*
*/