Thread: Anti-Ping Mask
View Single Post
Author Message
atom0s
Senior Member
Join Date: Jul 2009
Old 07-23-2009 , 12:15   Anti-Ping Mask
Reply With Quote #1

This plugin requires the RegEx SourceMod extension to be loaded!

Anti-Ping Mask


What is it?
Anti-ping mask is a plugin that helps prevent players from masking their latency shown to other players on the score board by allowing you to kick them, or ban them from your server. Ping masking is done by using an exploit known with the cl_cmdrate CVAR. Adding a character to the rate value causes the rate to be seen improperly to the server and causes the calculation of the players latency to be corrupted.

How does it work?
Simply put, the plugin queries every players cl_cmdrate upon connecting as well as throughout game play to check for an invalid rate. The plugin makes use the regular expression library to easily find any invalid non-numeric character inside the rate. If an invalid rate is found, the user is either kicked or banned (determined by settings) from the server and a message is displayed to all players informing them of what happened.

CVARs

antipingmask_version - Displays the current version of the plugin.
Default: N/A [Adjusted internally per-version.]
Values: N/A

apm_handler - Determines how Anti-Ping Mask should handle ping masked clients.
Default: 0 (Kick)
Values: 0 kick, 1 ban

apm_banlength - The length in minutes that a player is banned for ping masking.
Default: 30 (minutes)
Values: 0 for permanent, anything above per-minute. (Ex. 60 would be 60 minutes.)

apm_timeinterval - The interval time, in seconds, that the timer should tick at to check for ping masking clients.
Default: 15 (seconds)
Values: Anything above 0, the number is in seconds. (I suggest not going below 10.)


A screenshot of what is seen when a player is kicked for ping masking:
[IMG]http://img528.**************/img528/9985/pingmask.jpg[/IMG]


Installation

To install, simply copy the plugin file (antipingmask.smx) to your plugins folder, and copy the translation file (antipingmask.phrases.txt) to your translation folder. Both folders can be found inside of your sourcemod folder.


Change Log

Pending Version..
  • Added Hungarian translation. "hu" (Thanks to KhyrOO.)
  • Added Romainian translation. "ro" (Thanks to SunBeam.)

v1.6.0
  • Fixed version CVAR as requested by plugin approver.
  • Added Russian translation. "ru" (Thanks to exvel.)

v1.5.0
  • Added Polish translation. "pl" (Thanks to Zuko.)
  • Added Danish translation. "dk" (Thanks to Da BuzZ : "OLLI, QUIT WOW NOW")
  • Added German translation. "de" (Thanks to Abus3.)
  • Added Japanese translation. "jp" (Thanks to Sakuri.) (In Romanji to ensure character visibility.)
  • Added Norwegian translation. "no" (Thanks to olli : "Quit whining Da_BuzZ")
  • Added handler for OnPluginEnd to close timer manually. (Crash reports.)
  • Added handler for OnMapEnd to close timer per-map. (Crash reports.) (Possible lag report fix.)
  • Added pragma for semicolon enforcement.
  • Changed KillTimer to CloseHandle inside of TimerIntervalChanged.
  • Fixed spelling of TimerIntervalChanged. (Whoops lol..)
  • Fixed case-sensitive issue with plugin info structure.

v1.4.0
  • Removed handler for forcing rate changes on a client. (Doesn't work.)
  • Removed extra debug message that was left behind in a previous version.
  • Removed extra messages from the phrase file.

v1.3.0
  • Removed additional cmdrate checking against server min/max values. (Due to false-positive kicking.)
v1.2.0
  • Added SourceBan support.
  • Removed extra zero from version number.
v1.1.0.0
  • Added new CVARs for additional options.
  • Fixed regex expression used to determine invalid command rates.
  • Removed colon in message displayed when a user is kicked.
  • Added checks against the servers min/max cmd rate. (Thanks for the suggestion meng)
  • Added ability to ban players on invalid rate.
  • Added ability to force rate setting on invalid clients. (Thanks for the suggestion bman87)(Please see notes about this.)
  • Fixed confusion with IsValidCmdRate command.
Attached Files
File Type: sp Get Plugin or Get Source (antipingmask.sp - 9270 views - 8.6 KB)
File Type: txt antipingmask.phrases.txt (2.6 KB, 5298 views)

Last edited by atom0s; 08-26-2009 at 11:51. Reason: Upgraded to 1.5.0
atom0s is offline