AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Only Standard ASCII Characters in name (https://forums.alliedmods.net/showthread.php?t=335751)

Shadows Adi 12-30-2021 18:08

Only Standard ASCII Characters in name
 
Only Standard ASCII Characters in name
https://img.shields.io/badge/Author-Shadows%20Adi-green https://img.shields.io/badge/Version-1.3-green

Informations
Description
A plugin which check player's name if it contains Standard ASCII Characters. If not, the plugin will change his name, with one randomly choosen from the settings file.

It has reAPI support. You can use it by uncommenting line 4: #define USE_REAPI

NOTE! When a player is connecting to server, his name is checked too, because ClientUserInfo is called when a player is joining the server in order to get his setinfo fields, like his "name" field. Only using Fakemeta version!

NOTE 2! We need to call the checking function in client_putinserver() state, because reapi's RG_CBasePlayer_SetClientUserInfoName is called only
when a player is changing his name, not the same behaviour as RG_CSGameRules_ClientUserInfoChanged.


Requirements
  • AmxModX 1.8.2+
  • Fakemeta module
  • Optional ReAPI Module ( reHLDS Needed )
Installation
  • Download the archive from down below.
  • Compile anti_non_ascii_name.sma using a local compiler or a web compiler.
  • Put anti_non_ascii_name.amxx in amxmodx/plugins folder
  • Go to amxmodx/configs/plugins.ini, open the file and write on the last line anti_non_ascii_name.amxx.
  • Restart your server or change the map and you're ready to go.
ChangeLog

FULL Changelog can be found HERE
  • Version 1.1:
    • Initial Release
  • Version 1.2:
    • Added a function which checks player's name.
    • Improved file reading.
  • Version 1.3:
    • Added a cvar for server monitoring.
    • Improved code
GitHub Project

DOWNLOAD SOURCE CODE

bigdaddy424 12-30-2021 18:20

Re: Prevent Non-Standard ASCII Characters in name
 
I respect the effort but is there a reason how a server owner can benefit from this plugin

OciXCrom 12-30-2021 18:38

Re: Prevent Non-Standard ASCII Characters in name
 
Putting ReAPI under requirements sounds like you must have ReAPI in order to use the plugin, but the code says otherwise.
You should mention it's optional and explain how to enable/disable it.

Shadows Adi 12-30-2021 19:06

Re: Prevent Non-Standard ASCII Characters in name
 
Quote:

Originally Posted by OciXCrom (Post 2767305)
Putting ReAPI under requirements sounds like you must have ReAPI in order to use the plugin, but the code says otherwise.
You should mention it's optional and explain how to enable/disable it.

Yes, you're right, forgot about that. Thank you, description updated!

Quote:

Originally Posted by bigdaddy424 (Post 2767302)
I respect the effort but is there a reason how a server owner can benefit from this plugin

Thank you and yes, some plugins can be broke using non standard ASCII characters, depends how / for it's the player name used. For administrative commands too, as example, amx_kick, amx_slay ( and yes, I know there is the option for userid, but nickname is more handy, because you just press TAB and then type the command in console ) and so on.

Maybe there are a few client exploits based on the N-S ASCII characters, correct me if I'm wrong because I am not well documented about this part of GoldSRC engine.

And, in my opinion, it is bothering to see that special characters, tbh.

bigdaddy424 12-30-2021 19:26

Re: Prevent Non-Standard ASCII Characters in name
 
Your response to me should've been on the thread explaining how this plugin helps you deal with console commands with players using non standard letters and other stuff. Great plugin overall.

Shadows Adi 12-30-2021 19:40

Re: Only Standard ASCII Characters in name
 
Thank you! Tomorrow I will optimize the plugin.

Shadows Adi 12-31-2021 03:26

Re: Only Standard ASCII Characters in name
 
Update!
Version 1.2

  • Added a function which checks player's name.
  • Improved file reading.

Shadows Adi 01-01-2022 17:53

Re: Only Standard ASCII Characters in name
 
Update
Version 1.3:
  • Added a cvar for server monitoring.
  • Improved code


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

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