PDA

View Full Version : admin_ranking_system (Ludwig van)


kingpin
05-09-2004, 20:32
This is one of the great plugins made by LugwigVan, it gives the same functions as admin highlander in adminmod but quiet a bit more flexible. nothing changed by me in there just ported. Plz post anything u'd like to see added or any bugs etc.

/*AMX Mod X
//
//
// This plugin must be loaded SECOND (right after admin.amx) or at
// least before the plugins containg the commands you want to
// have this plugin affect, such as the AMXX default plugins in
// your PLUGINS.INI or it wont work.
*/
/*
********************************************* **********************************

Ported By KingPin([email protected]). I take no responsibility
for this file in any way. Use at your own risk. No warranties of any kind.

********************************************* **********************************/

/********************************************* **************************
* amx_ejl_adminhierarchy.sma release version 1.8 May 9/2004
* By: Eric Lidman Alias: Ludwig van
*
*
* *** Converted from my old adminmod plugin which does the same. ***
* *** See below for changelog
*
* This plugin performs much the same function as the old adminmod cvar
* admin_highlander, except it is more flexible. It allows a group of
* top admins to have their complete access (as specified in admin.cfg,
* but no more) to amx commands, while admins not in the group will
* only have limited access based on whateve admins above them that are
* present.
*
* Adminhierarchy should be useful for servers with many admins. Only
* admins in the top rank who are on at the time will have control over
* the more "global" commands on the server -- commands which directly
* affect more than one player such as amx_cvar or amx_map.
* This way admins can argue about what the gravity will be, but only
* the top admins can do anything about it -- until they leave, then the
* next highest admin in the ranks takes control. It is aimed at keeping
* order on the server. Commands such as slay, kick, ban are not limited
* by this plugin so that lower admins can still do thier jobs policing
* the game so to speak, just not controlling it. There is an exception
* to this rule: if a command, like slay is directed at a whole team,
* then the admin issuing it has to be the leading admin playing as this
* directly affects more than one player.
*
* This plugin also gives partial immunity to all admins. No one can
* amx_ban, amx_kick, or amx_vote_kick any admin. Admins without
* immunity in their access can still be slapped, slayed etc. This is
* just a precaution to keep lower admins from gaining power by
* kicking/banning higher admins.
*
* Commands:
*
* amx_signin --- tells the server you are on and ready to take your
* place in the admin hierarchy, low or high. This is
* not required if you are using the default scheme
* of having the server automatically sign you in.
* amx_resign --- used by a higher admin to let the next lower admin
* be the top admin while the higher admin is still
* connected. This is for all your either humble or
* lazy higher admins out there who dont want to be
* the higher admin for the moment.
* amx_topadmin --- use this to find out who the current top admin is.
* amx_adminstatus --- Lists admins who are currently playing in rank
* order and reports if they are signed in or not.
* A regular player looking at this will only see
* admins who have their access active, although
* the admins dont need to be signed in. Admins
* with thier access active from the admin.cfg
* looking at this will see all admins connected
* even if the othe admin do not have their admin
* access in the admin.cfg active.
* amx_cloak_owner --- Makes the number 1 admin invisible to the
* other admins. He wont be reported at all
* and will not be signed in automatically
* even if auto-signin is the current mode.
* If you decide to sign in, however, you will
* be exposed. But thats not the point of this.
* This allows for the server owner to watch
* stealthily over his admins while playing
* under a fake name. The command toggles on
* and off stealth mode and sets it in the
* ejl_vault.ini as the default until changed.
* Only the #1 admin can do this command.
* If you run any plugins which announce
* admin's entrances, you will want to modify
* them in such a way that they dont announce
* you, or disable them altogether. Of course
* you would only need to do this if you want
* to use the cloak owner mode. Obviosly an
* annouced entrance could blow your cover.
* amx_signin_default --- Toggles auto-signin mode on and off and
* sets it in the ejl_vault.ini as the default
* until it is changed again. Only the server
* owner can set this mode on or off.
* AMX ADMIN_RCON access required.
* amx_ah_reload --- Reloads the adminhierarchy.txt file so that
* changes made to it midway through a game
* can be effective immediately without having
* to wait for a map change. Only the server
* owner is allowed to use this command.
* AMX ADMIN_RCON access required.
* amx_ah_report --- Toggles the use of messeges telling when
* admins sign in, resign, connect, or
* disconnect and sets it in the vault as
* the default until it is changed again.
* This cuts down on chat use by the plugin
* and the bombarding of players with admin
* information if thats the way you like it.
* The commands, admin_adminstatus and
* admin_topadmin still work. Only the server
* owner can set this mode on or off.
* AMX ADMIN_RCON access required.
* amx_ah_guest --- If you are using a create admin on the fly
* plugin you can enable guest mode so that
* you do not need to set the temporary admin
* up in the adminhierarchy.txt. The temp
* admin is considered last in rank. Command
* toggles guest mode on and off. Default off.
* AMX ADMIN_RCON access required.
*
* By default, this plugin tries to automatically sign in admins on
* their connect. Also by default owner cloaking is off and use of
* messenging (admin_ah_report) is on. It is possible in cloak mode
* for a server owner to allow himself to be kicked (but not banned)
* by one of his admins. This is useful if you want to observe them
* extensively and not raise thier suspicions as they kick you. Then
* of course you can tell them later that they kicked you. (Then fire
* them. lol) By default in cloak mode you cant be kicked, but there is
* a switch below you can set to be in allow kick mode. If you change
* it, you need to recompile the plugin. The switch looks like this:
* #define AllowOwnerKick 0 // 0=no 1=yes
*
* This plugin uses AUTHIDS's for admin identification so it WILL NOT WORK
* for LAN games. AUTHIDS's for your admins MUST be entered into the
* adminhierarchy.txt file and that file must be in the folder with all
* your other amxx configs. ../addons/amxx/config AUTHID's by the way can be
* either SteamID's or wonid / Steam_IDS. For most of you that means wonid / Steam_ID.
*
* How to set up adminhierarchy.txt:
*
* At the beginning of each map, this file is read by the server to see
* how it should treat the admins. The format of the file is one admin
* for each line. Rank numbers are not given, it just goes in order top
* to bottom. First there is a number 1 or 2 to identify admin type
* (then a space), next is the admin's Wonid / Steam_ID (then a space), next is
* optional -- the admin's name just so it is easier for you to see who
* is who in the order. The name is not important to the plugin. Type 1
* admins are those who are not limited by this plugin. They can be on
* the server all at the same time and all issue "global" commands.
* Type 2 admins are the reason for this plugin in the first place. If
* an admin ranking higher than them is on, all the lower ranking type 2
* admins will have their power limited by this plugin. All type 1
* admins should be listed first, then type 2 in rank order.
*
* example of adminhierarchy.txt contents:
*
* 1 123454 mynamecuzimtheowner
* 1 527373 anothername
* 1 43498 anotherhighadmin
* 2 8994422 thehiestlowadmin
* 2 33743 anyoldadmin
* 2 748433 howiecarr
* 2 1277344 yetanotheradmin
*
* Advanced set-up adminhierarchy.txt:
*
* It is possible to have several different levels of type 1 admins,
* those that can operate together at the same time. Type 1 is the
* highest group of admins. If a type 1 admin is signed in, no one
* outside of another type one admin will have full power. Type "a"
* is the next group of admins, if no type 1's are signed in, then
* all type "a" admins are treated equal in rank just as type i's
* were. There are two more shared power groups, type "b" and type
* "c". The rules are the same. If anyone from a higher group is
* signed in, only the highest group has full access. Type 2 is the
* same as before, individual admins hight one over lower one. Admins
* must still be listed in rank order and group order must not be mixed
* up. If you put a type "c" before a type 1 in the list, there will
* be a malfunction.
*
* advanced example of adminhierarchy.txt contents:
*
* 1 123454 mynamecuzimtheowner
* 1 527373 anothername
* 1 43498 anotherhighadmin
* a 452014 adminingroupA
* a 3426551 adminequalingroupA
* a 34342 anotherAname
* b 523456 thegroupBadminsname
* b 434901 anmtherBname
* 2 8994422 thehiestlowadmin
* 2 33743 anyoldadmin
* 2 748433 howiecarr
* 2 1277344 yetanotheradmin
*
* Changelog:
*
*
* Dec.7, 2002 * miscount of admins fixed
* * misleading info given on admin disconnect fixed
* * error log file is now accesible while hlds runs
* * more commands added to limitation list
* Feb.12 2003 * more commands added to limitation list
* * bug fix in non admin kicking function
* Mar. 1 2003 * Added more admin groups, added a guest admin mode
* May.9, 2004 * All DIR structures updated for AMXX, ejl_vault goes in amxx/custom,
* * everything changed to [AMXX]
* July 31, 2005
* * Fixed directoris for AMXModX 1.01.
*
********************************************* *************************/

#include <amxmodx>
#include <amxmisc>

BigBaller
05-09-2004, 20:38
My suggestions would be

Use AMXX Directories. Also change the logging to log_amx native if thier are errors soo it goes all to one file (less server space taken :)) Otherwise I have no suggestions for it.

kingpin
05-09-2004, 21:04
sorry posted the wrong version, and mistakenly deleted the real one from my comp so im gonna donwload this one and fix it.

QwertyAccess
05-09-2004, 21:48
is this supposed to support steam http://www.nsarmslab.com/qwerty/smileys/nya.gif

kingpin
05-09-2004, 22:46
fixed, and it works fine on my steam server.

KoBe
05-27-2004, 23:06
I cant get this sma file to work . its not letting me login. its saying no access.i have every thing right .could someone that is running steam and has this running sendme or link the sma file that you use

kingpin
05-28-2004, 07:35
did u use the get plugin or compile by urself?

tron73
06-08-2004, 08:07
Hello there

I tried many ways to run this plugin on my dedi cz server, but it does not! I found in the sma, that the plugin tries to read the adminhierarchy.txt from .../amxx/config

and changed it to read from

.../amxx/configs

but it does not recognize me as an admin.

Ravager
07-17-2004, 03:37
I just want to bump this thread... this plugin doesn't work for me. The admins are signed in and everything, but when I'm the top admin, the other admins can still use all the same commands I can. Why is this?

FroXeN
07-17-2004, 06:46
hehe another luds plugin king pin :)

FroXeN
07-17-2004, 06:47
*/
/*
*************

eh i think its broken at the top isnt it?

kingpin
07-17-2004, 08:00
hehe another luds plugin king pin :)

ur so smart froxen u read luds name quiet nicely I see. did u heppen to read the date when it was ported? an also

*/
/* begin and end different sections so not broken take a look at it before pronouncing broken.

FroXeN
07-19-2004, 19:51
oh i c.. yes .. thanks you do a good job hosting server king pin 8)

bmann_420
07-23-2005, 01:04
This is pretty dam cool, cant believe i never saw this. :D THis whole time...

Andis
07-23-2005, 01:26
Wow... *downloads and installs*

nice job, dunno why i didnt think of this

*Noaim
07-29-2005, 08:52
It dosent work for me i did try both the get plugin and compile it myself... But it dosent work.. What have i done wrong?

bmann_420
07-29-2005, 13:15
You have to be a little more descriptive than that.... Is it a bad load? admins not working, conflicts? I mean waht is going on?

EKS
08-22-2005, 22:49
fix the hardcoded path