AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   High Ping Kicker (https://forums.alliedmods.net/showthread.php?t=70417)

Liam 04-24-2008 14:26

High Ping Kicker
 
1 Attachment(s)
/* 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.

ottobohn 04-24-2008 15:09

Re: High Ping Kicker
 
Could you add a white list for steam Ids to this?

Otto

Liam 04-24-2008 17:51

Re: High Ping Kicker
 
If you give them ADMIN_GENERIC as a flag they are immune.

steambob 04-24-2008 18:15

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

Thanks.

DontWannaName 04-24-2008 19:38

Re: High Ping Kicker
 
I edited it for reservation immunity. But can you add a cvar to set the flags. I want reserved and root to be immune.

toazron1 04-24-2008 20:47

Re: High Ping Kicker
 
If they have Admin_generic or greater, they are immune.

Liam 04-24-2008 22:12

Re: High Ping Kicker
 
Dontwannaname -- ?

DontWannaName 04-25-2008 00:36

Re: High Ping Kicker
 
Yes? Can you make a cvar to set the immunity flag for donators?

Liam 04-25-2008 07:30

Re: High Ping Kicker
 
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.

DontWannaName 04-26-2008 02:19

Re: High Ping Kicker
 
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.


All times are GMT -4. The time now is 21:04.

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