From 38651d7ca71bf1a502fdc33704f153f694c9113c Mon Sep 17 00:00:00 2001 From: Dpeta Date: Wed, 16 Nov 2022 06:41:00 +0100 Subject: [PATCH] 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. --- dataobjs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dataobjs.py b/dataobjs.py index b9b485a..b3440c2 100644 --- a/dataobjs.py +++ b/dataobjs.py @@ -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,)