Raised This Month: $51 Target: $400
 12% 

Client Checker (1.0.1) [Update 02-25-2007] SQL Support


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   Hawk552 (427)
Crazed
Member
Join Date: Oct 2006
Old 10-21-2006 , 06:04   Client Checker (1.0.1) [Update 02-25-2007] SQL Support
Reply With Quote #1

What does it do?

It can check client rates
It can check client CVARS which can be configured in a config file
It can show a (dis)connect message from clients (possibility to show from which country the player connects)
It can kick players with high ping (Used / Modified the HPK code)

CVARS:
  • cc_connectmsg - Shows who is (dis)connecting
  • cc_showgeoip - Shows connecting player country
  • cc_ratecheck - Check client rates
  • cc_cvarcheck - Check client cvars (using the config file)
  • cc_pingcheck - High ping kick
  • cc_writelog - Write invalid client settings and Admin actions to a log file
  • cc_chkdelay - Delay between checks in seconds
  • cc_maxping - Maximum allowed ping
  • cc_maxpingwarns - Ping check cycles before kick
  • cc_minupdaterate - Minimum allowed cl_updaterate
  • cc_mincmdrate - Minimum allowed cl_cmdrate
  • cc_minrate - Minimum allowed rate
  • cc_messagetype - Show message about invalid settings to:
    • 0 = Nobody
    • 1 = AMX Admins
    • 2 = Checked Player + AMX Admins
    • 3 = All players
  • cc_agreemenu - This will show the agreement menu
  • cc_agreetimeout - How long the client has to accept
  • cc_maxitems - This is to set how many cvars will be checked in one check cycle
  • cc_writecfg - Write changes to the client checker config file
  • cc_maxinvalid - Maximum allowed invalid changes of settings from a client before they will be kicked
  • cc_showinfo - Show info about client checker in client console
  • cc_sqlhost - SQL server hostname(:port)
  • cc_sqluser - SQL username
  • cc_sqlpass - SQL password
  • cc_sqldbname - Database to be used (default: ClientChecker)
  • cc_daystosave - How long the agreement of a client should be saved
CVAR Check Config:

cvar {
max_value - Use this for numeric values only
min_value - Use this for numeric values only

set_value - Value that will replace the invalid value (when using '*' as value it will set to the avg of the min and max value)

equal_to - Value can not be equal to this, if it is change it to the set_value
!equal_to - Value must be equal to this, if not change it to the set_value
contains - Value contains this. Change value to set_value (use comma to use spererate values)
!contains - Value does not contain this. Change value to set_value (use comma to use spererate values)
regex - Use a regex pattern (http://www.troubleshooters.com/codec...rl/perlreg.htm
}

Examples:

gl_polyoffset {
max_value 4
set_value 4
}

max_smokepuffs {
min_value 120
set_value 120
}

name {
contains fuck,shit,cunt
set_value BANNED_NAME
}


SQL:
The sql.txt file contains the database structure. The SQL stuff currently only saves the steamids in the database.


Requirements:
This plugin requires amxmodx 1.7 or later to work!

Change log:
1.0.1:
- Changed the CVAR checker config (it will still read its old config)
- Agree save is now using nvault to store steamid's. And it will remove entries older than 14 days by default (only if the SQL version is not used).
1.0.0:
- Added SQL support
0.0.9:
- Bugfix: Always showing agreement menu even while steamid was in saved list!
- Did some optimization 0.0.8 Optimized:
- Optimized the code
- Added option to show the info in console when client joins the server (cc_showinfo)
0.0.8:
- Bugfix: now using get_players instead of get_playersnum so all messages should be working now.
0.0.7:
- Changed the maximum save value to 512 (this is defined in the source code and can be changed to use a low or higher number)
- Added quick cvar check when a client joins the server.
- Added option to auto kick clients that keep changing there settings to an invalid value. (The number of invalid changes can be set in the config. And will only start after the first check).
- Added option to automaticly write admin changes to the config file.
0.0.6:
- Added option to show a agreement menu before the client checker starts. If the user doesnt agree he/she will be removed from the server.
- Added option to keep a little save file of the users who agreed (up to 64 records)
- Added a limit to maximum cvar checks in one check cycle. This is to prevent flooding with big cvar check lists. The maximum items to check can be set with "cc_maxitems".
0.0.5:
- Small bug fix with geoip when a bot joins the server. Also added some code to check if the country isnt matching error.
0.0.4:
- Fixed the cc_showgeoip cvar (it did not check if it was en/dis-abled)
- Added messages for High ping kick
- Added pcvars to make it faster
0.0.3:
- Fixed bug in Cvar checker
- Code revision (cleaned up some of the mess)
0.0.2: Public version
0.0.1: Private test version

Old versions:
The old versions can be found here:
http://crazed.swamo.com/ClientChecker

If you download this plugin please leave some feedback!

Note: The zip file includes the config files and this page as readme!
Attached Files
File Type: sma Get Plugin or Get Source (ClientChecker.sma - 13567 views - 34.3 KB)
File Type: sma Get Plugin or Get Source (ClientChecker_SQL.sma - 7238 views - 34.3 KB)
File Type: txt sql.txt (487 Bytes, 5410 views)
File Type: zip ClientChecker.zip (66.2 KB, 12141 views)

Last edited by Crazed; 05-17-2007 at 04:44. Reason: Optimized code
Crazed is offline
godlike
Senior Member
Join Date: Apr 2005
Old 10-21-2006 , 07:00   Re: Client Checker
Reply With Quote #2

n1 this plugin will be very usefull .
Are you sure this plugin isnt made yet?
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
Crazed
Member
Join Date: Oct 2006
Old 10-21-2006 , 07:39   Re: Client Checker
Reply With Quote #3

Quote:
Originally Posted by godlike View Post
n1 this plugin will be very usefull .
Are you sure this plugin isnt made yet?
Well there already is a cvar checker that does something similar but at the time I wrote the first version there wasnt. And this also has some other stuff added to it. I had no plans on putting it to public but changed my mind

Last edited by Crazed; 10-21-2006 at 12:28.
Crazed is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 10-21-2006 , 09:26   Re: Client Checker
Reply With Quote #4

Some of your code is very repeticious..

ex:

in cc_messagetype, you use this like 3 times when you can simply put it above all three if() statements..

PHP Code:
new players get_playersnum()
for (
0;<= players;i++)
{
            if (
is_user_admin(i))
            {
                       
//Your client_prints
            
}

I would also suggest changing the if() statements in there to a switch() statement like so:

PHP Code:
    new players get_playersnum()
    for (
0;<= players;i++)

    switch(
type)
    {
        case 
0:
        {
            return 
PLUGIN_HANDLED;
        }
        
        case 
1:
        {
            if(
is_user_admin(i))
            {
                
client_print(iprint_chat"%d %s: %s %s"idnamecvarvalue)
            }
        }
        
        case 
2:
        {
            
client_print(idprint_chat"%d %s: %s %s"idname ,cvarvalue)
            if (
is_user_admin(i))
            {
                
client_print(iprint_chat"%d %s: %s %s"idnamecvarvalue)
            }
        }
        
        case 
3:
        {
            
client_print(iprint_chat"%d %s: %s %s"idnamecvarvalue)
        }
    } 
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Crazed
Member
Join Date: Oct 2006
Old 10-21-2006 , 11:06   Re: Client Checker
Reply With Quote #5

hmm I was already looking for that switch stuff but didnt find it in the functions on the AMX doc. So wasnt sure if I could use it. thx anyway will update it right now

Last edited by Crazed; 10-21-2006 at 11:09.
Crazed is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-21-2006 , 20:16   Re: Client Checker
Reply With Quote #6

You don't need
Code:
case 0: {      return PLUGIN_HANDLED }

switch can and will only look for cases you specify.

And if you were to use 0 for type, it will most likely be for the off/disable/etc option, so case 0 can be omitted completely.
organizedKaoS is offline
kito
Junior Member
Join Date: Mar 2005
Old 02-17-2007 , 08:52   Re: Client Checker
Reply With Quote #7

hey this plugin is great , i was just about requestin it when i saw this

good work (y)
__________________
kito is offline
Surfer
New Member
Join Date: Feb 2007
Old 02-17-2007 , 11:42   Re: Client Checker (1.0.0) [Update 01-27-2007] SQL Support
Reply With Quote #8

Hy ... i have the same problem [AMXX] Run time error 10 (plugin "ClientChecker.amxx") (native "query_client_cvar") - debug not enabled!
I've put it in debug mode and then it says like that
Client CVAR querying is not enabled - check MM version!
[AMXX] Displaying debug trace (plugin "ClientChecker.amxx")
[AMXX] Run time error 10: native error (native "query_client_cvar")
[AMXX] [0] 13501.attach::FastCheck (line 556)
Client CVAR querying is not enabled - check MM version!
Pls help
Surfer is offline
masker33
New Member
Join Date: Feb 2007
Old 02-17-2007 , 11:53   Re: Client Checker (1.0.0) [Update 01-27-2007] SQL Support
Reply With Quote #9

Quote:
Originally Posted by Surfer View Post
Hy ... i have the same problem [AMXX] Run time error 10 (plugin "ClientChecker.amxx") (native "query_client_cvar") - debug not enabled!
I've put it in debug mode and then it says like that
Client CVAR querying is not enabled - check MM version!
[AMXX] Displaying debug trace (plugin "ClientChecker.amxx")
[AMXX] Run time error 10: native error (native "query_client_cvar")
[AMXX] [0] 13501.attach::FastCheck (line 556)
Client CVAR querying is not enabled - check MM version!
Pls help

Hi, I have the same error of you
masker33 is offline
Crazed
Member
Join Date: Oct 2006
Old 02-17-2007 , 12:17   Re: Client Checker (1.0.0) [Update 01-27-2007] SQL Support
Reply With Quote #10

says enough you are not using the latest metamod version .. download the latest at http://www.metamod.org or download a optimized version at http://metamod-p.sourceforge.net/


Quote:
Originally Posted by Surfer View Post
Hy ... i have the same problem [AMXX] Run time error 10 (plugin "ClientChecker.amxx") (native "query_client_cvar") - debug not enabled!
I've put it in debug mode and then it says like that
Client CVAR querying is not enabled - check MM version!
[AMXX] Displaying debug trace (plugin "ClientChecker.amxx")
[AMXX] Run time error 10: native error (native "query_client_cvar")
[AMXX] [0] 13501.attach::FastCheck (line 556)
Client CVAR querying is not enabled - check MM version!
Pls help
Crazed is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode