Raised This Month: $51 Target: $400
 12% 

Unicode Name Filter (Updated 29 Dec 2014)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Plugin ID:
4376
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Filters players names whom have unicode characters in their name. Can also help prevent name copying (experimental).
    Old 10-04-2014 , 20:41   Unicode Name Filter (Updated 29 Dec 2014)
    Reply With Quote #1

    Basically what this does is filters a player's name, and any characters that are not in the range of 32-126 of the ASCII table chart are ignored. After the filtering, it checks to see if there is at least 2 ASCII characters that it can use for the rename, and if there is not, it will rename players to their user-id #.

    Convars for your server.cfg:

    unf_enable_logs 1
    1 - Enable / 0 - Disable\nEnable Logging of the name changes.
    2- Do not log those whom skip filter checking.
    The log format is: logs/UnicodeNameFilter_%m_%d_%y.log

    unf_skipfilter_checking 0
    1 - Enable / 0 - Disable
    CommandAccess unf_skipfilter is checked to see if that player can skip the name filtering.
    Default Admin flag is ADMFLAG_RESERVATION.
    This can allow you to have VIP or Admins to skip filter checking.

    unf_enable_prevent_name_copying 0
    1 - Enable / 0 - Disable
    Enable Experimental prevent name copying/duplicates.

    unf_enable_userid_prefix 1
    1 - Enable / 0 - Disable
    If Enabled, it will use a players userid as a name if it finds a duplicate name of someone else.
    This works along sideunf_enable_prevent_name_copying.

    unf_enable_prefix "(1)"
    If unf_enable_userid_prefix is disabled, then duplicate names will be prefixed with this.

    unf_lock_name_after_filtering 1
    1 - Enable / 0 - Disable
    Locks a players name after the filtering changes it.
    (I believe this is TF2 only) I'll figure this out later.

    unf_tell_players_of_any_changes 1
    1 - Enable / 0 - Disable
    If enabled, will tell players when it makes changes to their name.


    Change Log:

    version 1.2
    - Added name locking after filtering a players name
    - Added a feature that allows you to turn of this plugin from telling players when it makes changes to their name
    - Added a 3rd option to unf_enable_logs so that your logs wont fill up with players it skips filtering for.

    version 1.1 - fixed the bug that psychonic found with copying the wrong number of bytes.
    - Updated the translations file.
    - Added new stuff.
    - Renames players instantly, instead of waiting for the server rename cooldown.


    version 1.0 - first release

    Previous version 1.0 data:
    File Type: txt UnicodeNameFilter.phrases.txt (287 Bytes, 15 views)
    File Type: sp Get Plugin or Get Source (UnicodeNameFilter.sp - 27 views - 5.1 KB)

    Previous version 1.1 data:
    File Type: txt UnicodeNameFilter.phrases.txt (417 Bytes, 31 views)
    File Type: sp Get Plugin or Get Source (UnicodeNameFilter.sp - 49 views - 5.1 KB)

    Do not forget to grab the newest translations file!
    Attached Files
    File Type: txt UnicodeNameFilter.phrases.txt (417 Bytes, 609 views)
    File Type: sp Get Plugin or Get Source (UnicodeNameFilter.sp - 1374 views - 13.9 KB)
    __________________

    Last edited by El Diablo War3Evo; 01-01-2015 at 04:20. Reason: Do not forget to grab the newest translations file!
    El Diablo War3Evo is offline
    Sarona
    AlliedModders Donor
    Join Date: Jul 2012
    Old 10-05-2014 , 02:17   Re: Unicode Name Filter
    Reply With Quote #2

    Quote:
    Originally Posted by El Diablo War3Evo View Post
    Basically what this does is filters a player's name, and any characters that are not in the range of 32-126 of the ASCII table chart are ignored. After the filtering, it checks to see if there is at least 2 ASCII characters that it can use for the rename, and if there is not, it will rename players to their user-id #.

    Currently it has no convars, as nobody has requested any. If you want to request something else this plugin can do for you, let me know.

    Don't forget the translations file!

    If you like this file, please do say so

    Hi, this plugin is able to auto-kick players who use a bug to avoid name? Or to kick away the players using: "unnamed", "& &", "%%". Or bugs as "unconnected"?

    Last edited by Sarona; 10-05-2014 at 02:19.
    Sarona is offline
    El Diablo War3Evo
    Veteran Member
    Join Date: Jun 2013
    Old 10-05-2014 , 13:48   Re: Unicode Name Filter
    Reply With Quote #3

    Quote:
    Originally Posted by Sarona View Post
    Hi, this plugin is able to auto-kick players who use a bug to avoid name? Or to kick away the players using: "unnamed", "& &", "%%". Or bugs as "unconnected"?

    I'm sorry, but I am not understanding your question.

    This plugin currently does not kick or ban players. It filters out unicode characters.

    See this chart: Characters allowed by the filter is from 32-126 Decimal. All other characters are filtered out. After filtering out all Unicode characters, if the left over characters have at least 2 ASCII characters from 32-126 decimal left, then it will rename that player to what ever is left over. If not, it will rename the player to their user id number.
    http://www.asciitable.com/


    If you are trying to ban or kick players because of certain names, there are other name handling plugins:

    [ANY] Bad name kick / ban with SourceBans support (Namechecker)
    -
    Bans / kicks players if they have a name that contains a phrase in bad_names.ini - e.g. membersearch, admin

    Uninamer (Unicode name changer)
    - rename/kick players who abusively use unicode names


    A lot of my plugins I write for Anti-Hacking stuff, I strive not to ban or kick players. The idea around a lot of my plugins is to solve the issue on server side and not lose players to a ban or kick.

    __________________

    Last edited by El Diablo War3Evo; 10-05-2014 at 13:48.
    El Diablo War3Evo is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 10-07-2014 , 20:33   Re: Unicode Name Filter
    Reply With Quote #4

    This is going to lead to transforming some UTF-8 characters into one or more valid ASCII characters, rather than removing them. You're looping bytes, not characters. UTF-8 characters consist of multiple bytes. One or more of them alone can be valid ASCII alone, even if they wouldn't make sense alone.

    Use GetCharBytes to determine the number of bytes that the character at a position is taking.
    psychonic is offline
    El Diablo War3Evo
    Veteran Member
    Join Date: Jun 2013
    Old 10-07-2014 , 21:18   Re: Unicode Name Filter
    Reply With Quote #5

    psychonic, thank you for the advice and example source code. I will get right to work on a update.
    __________________
    El Diablo War3Evo is offline
    Viper_Vicki
    AlliedModders Donor
    Join Date: Sep 2005
    Location: USA
    Old 12-24-2014 , 20:33   Re: Unicode Name Filter (Updated 8 Oct 2014)
    Reply With Quote #6

    Put it on my empires server so far so good thank you for the plugin, can you add a cvar so they cant keep changing back, the plugin does change it again but it would be nice if they changed it 3 times the plugin will kick them.

    I had one guy change it back about 10 times.
    __________________
    [VIPER]_Vicki

    Viper_Vicki is offline
    El Diablo War3Evo
    Veteran Member
    Join Date: Jun 2013
    Old 12-29-2014 , 03:56   Re: Unicode Name Filter (Updated 8 Oct 2014)
    Reply With Quote #7

    Quote:
    Originally Posted by Viper_Vicki View Post
    Put it on my empires server so far so good thank you for the plugin, can you add a cvar so they cant keep changing back, the plugin does change it again but it would be nice if they changed it 3 times the plugin will kick them.

    I had one guy change it back about 10 times.
    I added requested feature.

    unf_lock_name_after_filtering 1
    1 - Enable / 0 - Disable
    Locks a players name after the filtering changes it.

    ^ this is enabled by default in the newest update of this plugin.
    __________________
    El Diablo War3Evo is offline
    Viper_Vicki
    AlliedModders Donor
    Join Date: Sep 2005
    Location: USA
    Old 12-29-2014 , 22:29   Re: Unicode Name Filter (Updated 29 Dec 2014)
    Reply With Quote #8

    thank you another issue arose, some clan tags are being changed, could there be a white list added?
    __________________
    [VIPER]_Vicki

    Viper_Vicki is offline
    El Diablo War3Evo
    Veteran Member
    Join Date: Jun 2013
    Old 12-29-2014 , 22:33   Re: Unicode Name Filter (Updated 29 Dec 2014)
    Reply With Quote #9

    Quote:
    Originally Posted by Viper_Vicki View Post
    thank you another issue arose, some clan tags are being changed, could there be a white list added?
    How do you propose the whitelist handle them?

    * save the whitelist tag and apply it after the filter?

    * prevent names with tags from being changed in the whitelist?

    OR ???
    __________________
    El Diablo War3Evo is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 12-30-2014 , 06:30   Re: Unicode Name Filter (Updated 29 Dec 2014)
    Reply With Quote #10

    You should just use regex and replace the chars. I think i made something like this in the past. If i can find it i'll post it later.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 07:48.


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