ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Tool to check nickname validity #1380

Closed ctm closed 5 months ago

ctm commented 5 months ago

Update db_tool to have an option to check nickname validity of all the nicks in the database.

I rushed the new Nick code out yesterday and that caused a little problem, because although I had manually run a test for nicks with punctuation characters in them (which are no longer allowed), I wound up writing some more restrictions (#1367) at the last minute and didn't check against those. This appears to have bitten GamboMouse and ODB Phat Mack.

smalltalkdan: We also have "Unknown id 13" registered. ODB Phat Mack🏆: ahhhhhhhh ODB Phat Mack🏆: now I get it. ODB Phat Mack🏆: I had some trouble

from the logs:

2024-04-09T23:05:53.055Z WARN  [mb2::models] Could not turn GamboMouse  into a Nick, id: 13

My guess is GamboMouse's problematic nick had a trailing space, although it may have been a leading space. My guess is ODB Phat Mack's problem nick was due to the new unicode width restriction.

It was poor form for me to do yesterday evening's deploy without checking all the pre-existing nicks, so I should also write a post to the BARGE list. The subject should be "Move slowly and break things".

ctm commented 5 months ago

It's been so long since I've used db_tool that I forgot about it when I created this issue. The obvious way forward is to simply add another sub-command to it. Our current database is so tiny that we don't even need pagination, so once I find some time, this should be doable very quickly.

ctm commented 5 months ago

So, I've written it and run it on the local database and since we now no longer allow punctuation characters even as decorators, "craftpoker.com" fails as a nick. I suck at thinking.

I'll run this on the craftpoker.com database "soon" and then make some adjustments to the restrictions so that we allow "." at a minimum.

ctm commented 5 months ago

I've run it on the craftpoker.com database and found some restrictions to loosen. Now all the failing nicks are simply too long, with the exception of "Not, Sure", which is invalid due to the use of a comma. We now allow other punctuation characters, but not the comma, because that's what we use to separate nicknames in lists and it is definitely confusing to some.

I've just deployed the reduced restrictions.