Don't allow handles that start with numbers. (#103)

The first character of nicks can't be a digit according to the IRC protcol, compliant servers won't allow it.
This commit is contained in:
Dpeta 2022-11-16 06:41:00 +01:00
parent 8d1bef4db2
commit 38651d7ca7

View file

@ -597,6 +597,8 @@ class PesterProfile(object):
return (False, "Cannot start with uppercase letter")
if re.search("[^A-Za-z0-9]", handle) is not None:
return (False, "Only alphanumeric characters allowed")
if handle[0].isnumeric(): # IRC doesn't allow this
return (False, "Handles may not start with a number")
return (True,)