Wordlist Kicker - V1.1 - May 16th 2014I moved the backstory to just a normal pastebin, so it won't take up so much space:
https://pastebin.com/WabLuKQ0List of features:- Adding/removing words from the wordlist.
- People get kicked if their name contains a blacklisted word on join or if they change their name to contain a blacklisted word.
- Ability to blacklist strings like URLs that contain special characters (thanks to Megiddo's string-expertise).
- Ability to whitelist Steam ID's and connected players.
- Configuration settings located in <Garry's Mod server root>/data/wordlist_kicker/settings.txt/
Planned features: These are features I'm not too sure how I want them to be implemented yet. Don't you worry, they will come soon.
- Ability to change where the wordlist is saved.
Whitelisting users/Steam ID's that will be ignored. -- Added in v1.1- Non-ULib/ULX support.
Configuration (settings.txt):- IgnoreAdmins - Set to "yes" to ignore admins + every group that inherits from admin (including superadmins)
- IgnoreSuperadmins - Set to "yes" to ignore superadmins + every group that inherits from superadmin
List of commands: The commands will be displayed like this: "console command" or "chat command". As of right now, all commands are silently run.
- "ulx addword" or "!addword" - Put the word/string after the command to add* a word to the wordlist. Example: ulx addword cookie
- "ulx removeword" or "!removeword" - Put the word/string after the command to remove* a word from the wordlist. Example: ulx removeword cookie
- "ulx whitelist" or "!whitelist" - Put a player name after the command to whitelist a player (connected to the server) to be immune from the Wordlist Kicker. Example: ulx whitelist Decicus
- "ulx unwhitelist" or "!unwhitelist" - Put a player name after the command to remove a player (connected to the server) from the whitelist. Example: ulx unwhitelist Decicus
- "ulx whitelistid" or "!whitelistid" - Put a Steam ID after the command to add a Steam ID (example: STEAM_0:1:18726919) to the whitelist. Works the same way as whitelisting a player, but this way the player doesn't have to be connected to the server. Example: ulx whitelistid STEAM_0:1:18726919
- "ulx unwhitelistid or "!unwhitelistid" - Put a Steam ID after the command to remove a Steam ID from the whitelist. Useful for removing non-connected players from the whitelist. Example: ulx unwhitelistid STEAM_0:1:18726919
* You cannot add a word that already exists in the wordlist, nor can you remove words that don't exist in the wordlist.
Requirements:What can you use this for?:While my main idea for this was to prevent people from having curse words in their names, there are more ways this can be useful, even if you're not trying to use it the same way I originally intended it for.
If you use the whitelisting and "IgnoreAdmins" settings properly, you can prevent admin impersonators if you have a big clan server, for example. A lot of players look for a clan tag that matches the server to find an admin, and they could easily be fooled. If your clan members are admins, you could enable the "IgnoreAdmins" setting and blacklist your clan tag. That way non-clan members wouldn't be able to use the clan tag in their names and impersonate real ones.
Your clan members won't necessarily need to be admins either, you can whitelist connected players or a Steam ID so that they also will be able to use the clan tag. Although, that can be a hassle if you have many clan members without admin powers.
Of course, this is just another example I figured out. There are probably more situations where this is useful.
Other notes/FAQ (even though I haven't gotten any questions yet):- The default wordlist directory is in <Garry's Mod server root>/data/wordlist_kicker/words.txt/ - I do not recommend manually editing the file.
- Default command-access is set to SUPERADMIN - Any group that inherits superadmin will get access
- Be careful with what words/strings you blacklist. Let's use the example "low". Anyone with the name "low," "slow", "lower", "slower" (and more words that contain "low") will also get kicked.
- Variants of words will bypass the blacklist. Example, if you blacklist "low" then "l0w", "1ow" & "lovv" will not be detected unless you blacklist them specifically.
- I appreciate feedback and bug reports a lot. I'm still not completely comfortable with Lua, so if you find any mistake or something I can improve, then feel free to post about it. Requests are also welcome, but I will not guarantee that I can implement them myself.
Special thanks to:- MrPresident for being so helpful in the old thread.
- Megiddo for the suggestion about the ULibNameChanged hook and string library help.
- Storm for suggesting to make this into a full addon.
Downloads:The latest version will be attached to the post, but if you one reason or another want an older version, then all versions will be archived on a few mirrors:
DropboxGoogle DriveDecicus.com (My website)Links:Git Repository (GitHub)