Closed msikma closed 9 years ago
This is a name validator thing that is server-specific based on how we parse usernames, since Pokemon nicknames have the same constraints.
Tagging @Zarel since he built that and I'm unsure whether or not it actually needs fixing.
Katakana is valid in Pokemon nicknames, so that certainly is a bug
Certain Unicode ranges can probably be easily allowed; however, the issue is deeper than that.
I would say we may reserve our right to filter nicknames. We can't even have every English character though: commas are forbidden for protocol safety... Unless we use some sort of escaping?
What troubles me a bit is that the language of nicknames and their content may influence the perception that a player has about their opponent, meaning that nicknames have a psychological competitive value.
The problem itself can only be updated by Zarel because it relies on server-specific functions.
Validator#validateSet
uses Config.namefilter
as its nickname filter (which is also used to validate PS usernames) if it exists. It varies between servers and is not enabled by default.
namefilter
probably shouldn't be shared between Pokémon and user names.
It varies between servers and is not enabled by default.
If it's a setting, that explains why I seem to remember these names being usable some time ago (probably a couple of months up to half a year—haven't played in a while).
Of course, there's nothing wrong with filtering nicknames (you always need to get rid of trailing spaces or possible exploits such as Zargo-style glitch text), but of course it'd be nice for non-English players to be able to use their own script for their Pokémon names.
Trivia: Zarel's own teams use Japanese nicknames
If it's a setting, that explains why I seem to remember these names being usable some time ago (probably a couple of months up to half a year—haven't played in a while).
When the Pokemon Showdown hard drive crashed a few months back, we lost the name filter, so we had to rebuild one from scratch as fast as possible to prevent usernames from using gimmicky characters like the Cyrillic A and Unicode control characters. The fastest way to do this was to write the name filter to block all characters but a select few.
de9c3847fd88e14284e53f286dd5cfc796ef6691 removes the namefilter from Pokemon names.
It had already been fixed for a few weeks, I just left it uncommitted for a while since I was waffling on implementation details.
Well, yeah. But now we have a commit to prove it's been done :3
See the following example replay.
Both of them appear as though they have no nickname. Other Pokémon use only characters in the standard ASCII range, and their names display like normal.