|
User Status
Main Menu
|
25-07-02, 12:37am
|
#1
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
Admins kicked on map change? This is the plugin for you.
This is my latest antiadminkick plugin (version 3), it doesnt need an unrestricted adminmod dll anymore which is good news for linux people
however its been written for adminmod 2.50.37, and wont compile under .26
before i was just going to tell you to use my previous version if you are using .26, but i realise linux people cant, so ill write a .26 compatible version tomorrow.
here's the info (its in code tags to keep formatting):
[edit]
JUST A REMINDER:
In the newer versions of this plugin, things have changed, so the following is actually wrong in a lot of cases.
Get the latest version and read the included readme.txt file for correct information
[/edit]
Code:
/**
* plugin_antiadminkick.sma
* Author: !2SX!
* 24/7/02 (day, month, year hehe dumb american date format, makes no sense yadda yadda)
* version 3
*
* Thanks goes out to:
* Ravenous BugBlatter Beast - he gave me lots of help and allowed me to bounce ideas off him
* and he cleaned up some of my code for me.
* Bud-Froggy - i also discussed concepts of the plugin with him and he showed me (incorrectly)
* how to do bitwise operations in small :P thanks froggeh.tv
*
* Version History
* 3 - Totally reworked version, it now exec's the line "admin_password xxx" on admins who
* deserve it, thereby negating the need for the unrestricted dll.
* 2 - This version only exec'd adminpass.cfg on people who had reserved nick or slot access.
* 1 - i had to redownload this version from the adminmod forums to find out what it did,
* as i didnt have any backups of it hehe. It just exec'd the adminpass.cfg file on
* everyone on the server near mapchange.
*
* How it works:
* Compiles 2 arrays of admin names and passwords from the users.ini file, and when the map
* is about to change, it compares the names/wonID's of the people on the server to those
* in the arrays. If there's a match, it will execclient(Name, "admin_password xxx") on the
* user so their password is renewed and hopefully they dont get kicked.
*
* Who this works on:
* + Anyone listed by WONID in the users.ini file, so even if you dont have reserved nick access,
* you still get re-authenticated so you still have admin powers.
* + Anyone listed by name in the users.ini file with at least reserved nick access.
* - This plugin wont work on people who's name is made up of all numbers and is listed by name
* in the users.ini file - it opens up a security hole.
* - People listed by name without reserved nick access cannot be re-authenticated as it would open
* a large security hole - a non admin could just join the server with an admin's name and then
* be authenticated by this plugin.
* To make it easy, just list everyone by WONID in your users.ini file (or give everyone listed by
* name reserved nick access), then this plugin will re-authenticate everyone, not just some.
*
* What you need to do:
* Adjust the two constants "NUMBER_OF_ADMINS" and "SHOW_AUTHENTICATION" in the sma file to your
* liking, the preceeding comments explains what they mean and what to set them to. You can also
* leave them at their defaults if you dont know much about editing sma files (just open it in
* notepad).
* Have a well formed users.ini file (chances are, if adminmod can read it fine, so can this plugin).
* You can have comments in your users.ini file, just as long as they // comments (not / * or ; or #
* comments which i dont think are supported anyway, but you never know).
* You must set allow_client_exec to 1 in your server.cfg and/or listenserver.cfg file, or this
* plugin wont work at all.
*
*/
oh btw RBBOT ill make an admin_command for it tomorrow too.
please give me feedback, ive tested it a bit on my server and it works for the ways i tested, but u may find something wrong, so please tell me
[edit] THIS VERSION IS NOW OUTDATED.
newer versions are in below posts, grab them instead. [/edit]
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
Last edited by !2SX! : 17-08-02 at 05:15pm.
|
|
|
25-07-02, 02:20pm
|
#2
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
new version 3.01, ive now made a version that will work with 2.50.26.
changes are:
* 3.01 - Miscellaneous fixes and tweaks, neater code, added in the admin_reauth function
so other plugins can call this one to auth users on demand.
here is the adminmod 2.50.37 version
[edit] THIS VERSION IS NOW OUTDATED.
newer versions are in below posts, grab them instead. [/edit]
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
Last edited by !2SX! : 28-07-02 at 10:16pm.
|
|
|
25-07-02, 02:21pm
|
#3
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
and here is the adminmod 2.50.26 version, i havent been able to test this one cos i run adminmod 2.50.37, but the changes were minimal so it should work fine.
[edit] THIS VERSION IS NOW OUTDATED.
newer versions are in below posts, grab them instead. [/edit]
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
Last edited by !2SX! : 28-07-02 at 10:17pm.
|
|
|
25-07-02, 10:54pm
|
#4
|
|
Initiate
Join Date: Mar 2002
Posts: 9
|
!2SX!, thanks alot for this plugin!
I have been running it for a couple of hours, but I still have some problems with admins losing their rights on map change. Is it possible to add a admin-function that returns a list of all authenticated players? That would make it easy to see which admins that aren't authenticated just before the map changes.
|
|
|
26-07-02, 12:55am
|
#5
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
well, if you have SHOW_AUTHENTICATION set to 1, then just ask your admins if they're auth'd cos if they are a message will appear on their screens just before map change saying
"You have been re-auth'd with AdminMod"
are you using any special map management plugin by any chance?
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
|
|
|
26-07-02, 01:39am
|
#6
|
|
Initiate
Join Date: Mar 2002
Posts: 9
|
There are about 350 players with access level 32768 in my users.ini, so it would be very nice to be able to do some semi-automated checks during gameplay.
I am not using any map management plugin.
Last edited by MrSpock : 26-07-02 at 01:40am.
|
|
|
26-07-02, 11:54am
|
#7
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
wow 350
did you change the NUMBER_OF_ADMINS to reflect the number of users in your users.ini ?
are all these people listed by wonid?
what do u mean semi automated checks?
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
|
|
|
26-07-02, 05:18pm
|
#8
|
|
Initiate
Join Date: Mar 2002
Posts: 9
|
Yes, I changed NUMBER_OF_ADMINS to 500.
Yes, all these are listed by WonID.
I suppose admin_reauth does what I want, but it would be very nice to see a list of all authenticated players when I execute the command.
|
|
|
26-07-02, 11:36pm
|
#9
|
|
pangalacticgargleblasted
Join Date: Mar 2002
Location: Traal (Well, London really)
Posts: 1,333
|
You could get the admin_debug cvar value and if its on, have AuthUsers selfmessage the state of each player - authed or not.
Then it will go the client console of the calling user or the server console if called from a timer.
|
|
|
27-07-02, 12:58am
|
#10
|
|
Initiate
Join Date: Jul 2002
Location: Houston, Texas
Posts: 5
|
Pardon my question (I'm an Admin Mod n00b) but will this address the issue where ALL users not just admins drop at map change?
I have had to change the map timelimit to several hours just so that I dont lose my players.
|
|
|
27-07-02, 02:31am
|
#11
|
|
pangalacticgargleblasted
Join Date: Mar 2002
Location: Traal (Well, London really)
Posts: 1,333
|
It won't help with all users being dropped.
|
|
|
27-07-02, 05:40am
|
#12
|
|
Junior Member
Join Date: Nov 2001
Location: NYC
Posts: 67
|
Compiled fine, but I get this error at server startup. Using 25037 AM.
Any idea what could be causing this error?
L 07/26/2002 - 16:38:56: [ADMIN] Loading plugins from file 'plugin.ini'
L 07/26/2002 - 16:38:56: [ADMIN] ERROR: Executing plugin_init on plugin D:\Server test\HLServer\cstrike\dlls\plugin_antiadminkick.am x returned PLUGIN_FAILURE
L 07/26/2002 - 16:38:56: [ADMIN] ERROR: StartPlugin on plugin 'D:\Server test\HL
Server\cstrike\dlls\plugin_antiadminkick.amx' failed. Plugin not loaded.
L 07/26/2002 - 16:38:56: [ADMIN] Time left on map: 24:58.
L 07/26/2002 - 16:38:56: [ADMIN] Loaded 11 plugins
L 07/26/2002 - 16:38:56: [ADMIN] Plugins loaded successfully.
L 07/26/2002 - 16:38:56: [ADMIN] ERROR: CPlugin::HandleCommand called when no AMX present for plugin 'D:\Server test\HLServer\cstrike\dlls\plugin_antiadminkick.
amx'.
L 07/26/2002 - 16:38:56: [ADMIN] ADMIN Command: Admin used command admin_restrictweapon 8 5@
L 07/26/2002 - 16:38:56: [ADMIN] ERROR: CPlugin::HandleCommand called when no AMX present for plugin 'D:\Server test\HLServer\cstrike\dlls\plugin_antiadminkick.
amx'.
L 07/26/2002 - 16:38:56: [ADMIN] MOTM Time Is 600 seconds
L 07/26/2002 - 16:38:56: [ADMIN] ADMIN Command: Admin used command admin_motm_time 600@
L 07/26/2002 - 16:38:56: [ADMIN] ERROR: CPlugin::HandleCommand called when no AM
X present for plugin 'D:\Server test\HLServer\cstrike\dlls\plugin_antiadminkick.am x'.
L 07/26/2002 - 16:38:56: [ADMIN] MOTM Duration Is 5 seconds
L 07/26/2002 - 16:38:56: [ADMIN] ADMIN Command: Admin used command admin_motm_duration 5
Last edited by Sith Apprentice : 27-07-02 at 05:41am.
|
|
|
27-07-02, 05:49am
|
#13
|
|
Junior Member
Join Date: Nov 2001
Location: NYC
Posts: 67
|
Nevermind, my error. My user file was named userpower.ini, so I renamed it to users.ini and changed it in my server.cfg too and now the plugin works correctly
I'm learning...slowly....but I'm gettin there! 
Last edited by Sith Apprentice : 27-07-02 at 05:50am.
|
|
|
27-07-02, 03:17pm
|
#14
|
|
Initiate
Join Date: Jul 2002
Posts: 4
|
Is there anyone that's using admin mod 2.50.26 that got this to work? I'm also using metamod 1.12.4. The game is Day of Defeat 3.0. After installing the plugin nothing changed. Still got the message randomly (I still haven't figured out when to expect this - what is it like every 30 minutes?) I dled the correct version above (the 2.50.26 version). Compiled the .sma to an .amx. Put the .amx in the server's dll folder. Added the line dlls/plugin_antiadminkick.amx to the plugins.ini folder. No go. Did anyone catch anything wrong there? I wanted to install the beta 2.50.37 version but I'm not THAT familiar with the set up, although i know what i'm doing for the most part. The default Number of admins in the .sma file is 30, and i just left it at that since our server has 8 admins. Thanks very much.
Mike
*edit*: My users.ini is listed by wonid.
Also, is the plugin effective when an admin changes the map before the time has ended using admin_map <map>?
Last edited by wiffle : 27-07-02 at 03:20pm.
|
|
|
28-07-02, 03:59pm
|
#15
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
Quote:
You could get the admin_debug cvar value and if its on, have AuthUsers selfmessage the state of each player - authed or not.
Then it will go the client console of the calling user or the server console if called from a timer.
|
yeah thats a good idea ill get onto it.
Quote:
|
I suppose admin_reauth does what I want, but it would be very nice to see a list of all authenticated players when I execute the command
|
hmm the whole point of the plugin is admin_reauth is effectively called at the end of the map, you shouldnt have to call it yourself.
try this - somewhere around line 166 (depending on whether you're using the .26 or .37 version) you'll see this line:
kill_timer(timerKill);
change it to this:
//kill_timer(timerKill);
see if that fixes your problem (that means it will auth everyone a few times near the map end instead of just once).
let me just stress to anyone else reading this that you shouldn't do this unless you're experiencing the same type of problem, it wil just make the plugin less efficient.
but i just had a thought, if you have so many admins, maybe its not able to auth all of them cos there isnt enough time.. u may also want to try this - somewhere around line 160 is this line:
if (maptime(1,0) < 6) {
change it to this:
if (maptime(1,0) < 20) {
that way it will re-auth everyone when there's about 20 seconds to go, that should give the plugin more time to do it all.
Quote:
|
Still got the message randomly
|
what message?
Quote:
|
Did anyone catch anything wrong there?
|
looks good.
Quote:
|
I wanted to install the beta 2.50.37
|
you cant anyway, 2.50.37 will only work with metamod 1.12.0.
so how do u know its not working?
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
Last edited by !2SX! : 28-07-02 at 04:00pm.
|
|
|
28-07-02, 10:13pm
|
#16
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
i just realised i probably should have said this before, but for the plugin to work you have to have allow_client_exec set to 1
its in your (listen)server.cfg file. ive updated the readme etc.
here's the next version (3.02), it has that re-auth info that mrspock asked for:
Code:
* 3.02 - Added debugging stuff, if admin_debug is on anything other than 0, the person who
* called the AuthMe function will be told who's been auth'd - eg an admin can call
* admin_reauth and they'll be told who's being re-authenticated.
heres the 2.50.37 version:
[edit] THIS VERSION IS NOW OUTDATED.
newer versions are in below posts, grab them instead. [/edit]
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
Last edited by !2SX! : 07-08-02 at 06:40pm.
|
|
|
28-07-02, 10:14pm
|
#17
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
here's the 2.50.26 version:
[edit] THIS VERSION IS NOW OUTDATED.
newer versions are in below posts, grab them instead. [/edit]
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
Last edited by !2SX! : 07-08-02 at 06:40pm.
|
|
|
29-07-02, 01:52am
|
#18
|
|
Initiate
Join Date: Jul 2002
Posts: 4
|
The message i was talking about was the "[admin] name reserved on this server" message. I have had allow_client_exec set to 1, but it is set through my server.cfg. Do i just add that line to my listenserver.cfg file too? I know you said you use 2.50.37 so I just wanted to see if the plugin doesn't work on 2.50.26 since you have no way of testing it. Is anyone here on 2.50.26 and having success, or admin_wtf have you been told that it works? I'm gonna try the new plugin now and see how it turns out.
Mike
Last edited by wiffle : 29-07-02 at 01:58am.
|
|
|
29-07-02, 01:55pm
|
#19
|
|
ta'veren
Join Date: Nov 2001
Location: sydney
Posts: 6,004
|
im pretty damn sure it should work, the only changes are that wonID's are stored by numbers not strings in .26
let me just go thru what i changed again to make sure.
hmm.
ok ok ill put .26 back on and test it 
__________________
"when i make my game it says something has to be set to 1 and what do i have to set to 1" - voski
|
|
|
29-07-02, 03:17pm
|
#20
|
|
Initiate
Join Date: Jul 2002
Posts: 4
|
That is very generous of you. I'm much appreciative.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +10. The time now is 07:19pm.
|