Raised This Month: $32 Target: $400
 8% 

Bad Convar checking.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 06-19-2011 , 17:33   Bad Convar checking.
Reply With Quote #1

One thing that has always irked me with this plugin (KAC) is the fact that cvars aren't actually checked for their real values. For instance if you were to change sv_gravity from 800 to something non-standard ie 250, people would be banned for Cvar violations. While this works for regular servers, at the moment it's not too great for surfing/strafing and the like with CSS.

While I've worked around this in the past, it would be nice if the change was made globally.
KyleS is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 06-20-2011 , 02:37   Re: Bad Convar checking.
Reply With Quote #2

I think KAC/SMAC takes this into account. For example, if you change sv_cheats to 1, players will only get banned if they didn't successfully replicate the cvar (for having it at something other than 1).

I just tested it now with sv_gravity and it seems to work. If you'd like to play it safe, you can remove cvars from the checklist that you know you'll be changing. Ex: smac_removecvar sv_gravity
GoD-Tony is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 06-20-2011 , 06:48   Re: Bad Convar checking.
Reply With Quote #3

This used to be an issue in KAC versions < 1.1.8 if I recall correctly, but it was fixed.
__________________
thetwistedpanda is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 06-20-2011 , 07:44   Re: Bad Convar checking.
Reply With Quote #4

I can recall this change being made as well. I had a slew of users banned today on a map that simply changed the servers gravity. I'm going to have to remember what I did. KAC's source has gotten pretty convoluted, or at least it has me in a complete state of disarray.
KyleS is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-20-2011 , 07:55   Re: Bad Convar checking.
Reply With Quote #5

I did a quick look, and it does indeed kick the client if their gravity is not 800, regardless of what the server has set. As far as I know, that part has not changed from KAC 1.2.x when Kigen rewrote the cvar check system.

One of us will get this fixed. There should ideally be a check type to just check that a convar matches what the server has, rather than only allowing checking against hard, set values.

Edit: actually, I'm going to look at this now. (warning so that we're not stepping on each others' toes).

Last edited by psychonic; 06-20-2011 at 08:29.
psychonic is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 06-20-2011 , 10:51   Re: Bad Convar checking.
Reply With Quote #6

Quote:
Originally Posted by KyleS View Post
KAC's source has gotten pretty convoluted, or at least it has me in a complete state of disarray.
After looking at it for a while, I feel like KAC became overly complex in some parts just for the sake of making changes.

Quote:
Originally Posted by psychonic View Post
There should ideally be a check type to just check that a convar matches what the server has, rather than only allowing checking against hard, set values.
Yeah that's the best way to go. I think there is some existing code in there that attempts to do the same thing in a more complicated way. There are a bunch of functions/timers with the "Replicate" name that I didn't feel like going over.
GoD-Tony is offline
Xp3r7
SourceMod Donor
Join Date: Jul 2006
Old 06-20-2011 , 12:45   Re: Bad Convar checking.
Reply With Quote #7

I use SMAC on a SKDM server with no problems but the gravity is also changed via the server.cfg.

I also use this on another server where I have changed the gravity while in-game for a few rounds here and there and didnt see anyone get kicked.
__________________
Xp3r7 is offline
Send a message via MSN to Xp3r7
Doc
Member
Join Date: May 2005
Old 06-23-2011 , 02:59   Re: Bad Convar checking.
Reply With Quote #8

Any update on this? Got a lot of players getting banned for SMAC: ConVar sv_gravity violation (mini games maps).
__________________
Doc is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 06-23-2011 , 03:26   Re: Bad Convar checking.
Reply With Quote #9

Quote:
Originally Posted by Doc View Post
Any update on this? Got a lot of players getting banned for SMAC: ConVar sv_gravity violation (mini games maps).
Until it is fixed, remove cvars that you know will be changed. Example: add smac_removecvar sv_gravity to your smac.cfg
GoD-Tony is offline
Doc
Member
Join Date: May 2005
Old 06-23-2011 , 03:47   Re: Bad Convar checking.
Reply With Quote #10

Ah! Thanks for the tip.
__________________
Doc is offline
Reply


Thread Tools
Display Modes

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 16:24.


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