View Single Post
Author Message
Silent_Water
Member
Join Date: Sep 2008
Old 01-08-2009 , 04:44   Name Checker 1.5
Reply With Quote #1

Name Checker 1.5

This plugins checks the players name on connect and on change. It kicks/bans a player, that changes his name too often or does some hacking with his name.

I've copied some ideas and code snippets from Kigen's Anti-Cheat. Thanks to him for that.

This Plugin is tested on DOD:S but should work on all other source games and mods too. Please reply if you could verify this.


Installation

Just compile the source and/or copy the compiled .smx to your sourcemod plugins folder.


Variables

sm_name_checker
Just shows the Name Checker version

sm_name_change_count
Blocks name changes more than x times per map, default: 4

sm_name_copy_size
The first x characters of the name must be unique, default: 16

sm_name_copy_diff
How many characters must be different at least (0 = disable), default: 2

sm_name_ban_time
How long should be banned - in minutes (0 = permanent), default: 5

sm_name_special_chars
How many special characters (not readable) are allowed, default: 16

sm_name_multi_byte
How many multi-byte characters (arabian, chinese, ...) are allowed, default: 31

sm_name_change_action

What action is to be done if a player changes his name to often? (deny|kick|ban), default: kick

sm_name_invalid_action
What action is to be done if a player has an invalid name? (deny|kick|ban), default: kick

sm_name_min_size

Minimum required length of a name, default: 1

sm_name_max_size
Maximum allowed length of a name, default: 63

sm_name_tell_details
Tell the player the detailled reason?, default: 1


Files

configs/badnames.txt
This file may contain a list of bad names or parts (one per line, may contain any character, even multibyte).

This file is created if not found. Default content is unnamed. Comments are NOT allowed and will be seen as names, empty lines will be ignored. Spaces before and after a name will be ignored. The number of entries is not limited - but keep it small

Be sure to block the right names! Check is NOT case sensitve and it is searched WITHIN a name. So a bad name like sex would block a name like PlaysExtremelyBad too.

Example:
unnamed
unconnected


cfg/sourcmod/namechecker.cfg
This file will be generated if it does not exist. It contains all configuration options.


Version history

1.5 (07/20/2009):
- a lot of changes
- added detailled output of kick reason
- added "deny" action (thanks to Roachy for the idea)
- added automated generation of a config file
- bug fixes
1.4 (04/12/2009):
- some minor changes - I did not publish
1.3 (01/09/2009):
- added bad name file (see "Files" above)
- added variable for minimum required name length
- added variable for max allowed name length
1.2 (01/08/2009):
- First stable public release
- Now uses sourcebans (if available)
- fixed an issue with names of length 1
Attached Files
File Type: sp Get Plugin or Get Source (namechecker.sp - 3861 views - 15.9 KB)

Last edited by Silent_Water; 07-20-2009 at 16:19. Reason: new version 1.5
Silent_Water is offline