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

High Ping Kicker


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Liam
SourceMod Developer
Join Date: Jan 2008
Location: Atlanta, GA
Plugin ID:
363
Plugin Version:
2.9
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    14 
    Plugin Description:
    Unapprover:
    Reason for Unapproving:
    Discontinued.
    Old 04-24-2008 , 14:26   High Ping Kicker
    Reply With Quote #1

    /* Notes */
    This plugin was written to enable server admins to enforce a maximum ping that players can have. It takes the players cmdrate and the servers tickrate into account when doing this. It will not check players who are currently connecting or are not on a team.

    Server Config Information: http://forums.srcds.com/viewtopic/1094 -- Thanks to |GsX| GrimReaper for finding that article.

    This plugin has been compiled and tested on both non-orange box and the orange box servers, and requires SM 1.0.x or 1.1.x. Those can be downloaded at: http://www.sourcemod.net/snapshots.php

    Thanks to BAILOPAN, k41m, Tsunami, Teame06, and EKS for their help in this.

    /* Installation */
    Compile the file attached and put it in the addons\sourcemod\plugins folder. Then go to your rcon and type sm plugins load hpk or simply change the map.

    Make sure that you edit the config file in <mod>/cfg/sourcemod/hpk.cfg to set the max ping you want. The default is 150. This file is auto-generated the first time you run the plugin.

    CVars:
    sm_checkping "1" -- Check players ping. 1 = on, 0 = off.
    sm_checkchoke "1" -- Check players choke. 1 = on, 0 = off.
    sm_checkloss "1" -- Check players loss. 1 = on, 0 = off.
    sm_checkpackets "1" -- Check players packets. 1 = on. 0 = off.

    sm_maxping "150" -- This is the max ping clients are allowed.
    sm_maxchoke "30.0" -- Max choke allowed by clients.
    sm_maxloss "30.0" -- Max loss allowed by clients.
    sm_minpacketin "30.0" -- Minimum packets in allowed by clients.
    sm_minpacketout "55.0" -- Minimum packets out allowed by clients.

    sm_ping_admins_immune "1" -- Admins are immune? 1 = Yes, 2 = No


    /* Changelog */
    1.0 - Initial Release
    1.1 - Added logging about who was kicked to the SM Logs.
    - Added a better delay timer for joining people.
    - Adjusted extension code to give a more accurate ping.
    2.0 - Total rewrite
    - Added tracking cvar.
    - Removed the extension and ported to native SourceMod
    - Reconfigured kick messages to show current ping and max ping.
    2.1
    - Corrected an issue with the timer that was causing it to run multiple times after a series of map changes. This was causing almost instantaneous kicks for people who's ping spiked even a single time.
    - Made the code a bit more efficient in dealing with map changes and delay.
    2.2
    - Fixed an exploit in the mis-calculation of players ping if they were spoofing their cmdrate to ultra-low levels.
    2.4
    - Added support for HL2DM
    - Added the beginnings of the choke/loss/rates system (Currently disabled)
    - Added sm_rates command (sm_rates | sm_rates <target>)
    2.5
    - Added the translation file to OnPluginStart to fix issues with TargetClient.
    - Fixed a bug in the sm_maxping cvar not being used properly.
    2.6
    - Added support for Choke, Loss, Packets In, and Packets Out
    - Cleaned the code up for efficiency
    - Added in new cVars to configure Ping, Choke, Loss, Min. Packets In, and Min. Packets Out.
    2.7
    - Added 4 new cVars to enable/disable each function of the plugin.
    - Suggestion is to remove hpk.cfg and generate a new one on a clean restart of the server to generate the new options.
    2.8
    - Changed the output formatting from int variables to float variables in their appropriate places.
    2.9
    - Fixed a bug in the code that handles checking and then kicking players. Thanks for finding this Flyflo.
    Attached Files
    File Type: sp Get Plugin or Get Source (hpk.sp - 8566 views - 12.1 KB)

    Last edited by Liam; 10-17-2008 at 14:23.
    Liam is offline
    ottobohn
    Senior Member
    Join Date: Sep 2007
    Old 04-24-2008 , 15:09   Re: High Ping Kicker
    Reply With Quote #2

    Could you add a white list for steam Ids to this?

    Otto
    ottobohn is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 04-24-2008 , 17:51   Re: High Ping Kicker
    Reply With Quote #3

    If you give them ADMIN_GENERIC as a flag they are immune.
    Liam is offline
    steambob
    Member
    Join Date: Sep 2007
    Old 04-24-2008 , 18:15   Re: High Ping Kicker
    Reply With Quote #4

    Could you add a cvar which would set the duration of checks (that one which is 20 secs now)?

    Thanks.
    steambob is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 04-24-2008 , 19:38   Re: High Ping Kicker
    Reply With Quote #5

    I edited it for reservation immunity. But can you add a cvar to set the flags. I want reserved and root to be immune.
    __________________

    DontWannaName is offline
    toazron1
    Senior Member
    Join Date: Oct 2006
    Old 04-24-2008 , 20:47   Re: High Ping Kicker
    Reply With Quote #6

    If they have Admin_generic or greater, they are immune.
    __________________
    toazron1 is offline
    Send a message via AIM to toazron1
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 04-24-2008 , 22:12   Re: High Ping Kicker
    Reply With Quote #7

    Dontwannaname -- ?
    Liam is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 04-25-2008 , 00:36   Re: High Ping Kicker
    Reply With Quote #8

    Yes? Can you make a cvar to set the immunity flag for donators?
    __________________

    DontWannaName is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 04-25-2008 , 07:30   Re: High Ping Kicker
    Reply With Quote #9

    You mean a custom flag? I guess? Why don't I just move the flag it checks for to a cVar and you can set that on donators and admins instead of having 80 thousand checks in there.

    Also, like I already stated: if you flag them ADMIN_GENERIC then it will give them immunity anyway and I don' think any of the base commands use that flag.
    Liam is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 04-26-2008 , 02:19   Re: High Ping Kicker
    Reply With Quote #10

    Oh ok. Well I edited it but I guess if Generic is the same as reservation because its a flag then its all good. So anyone with an admin flag is immune basicaly.
    __________________

    DontWannaName 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 02:55.


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