make 'is_registered' regex a raw string
to fix the following warning with python 3.12: SyntaxWarning: invalid escape sequence '\S'
This commit is contained in:
parent
34a3f06d91
commit
51a37c4562
2
bert.py
2
bert.py
|
@ -176,7 +176,7 @@ def is_registered(username):
|
||||||
try:
|
try:
|
||||||
sendRaw("WHOIS "+str(username)+"\n")
|
sendRaw("WHOIS "+str(username)+"\n")
|
||||||
user_info = getMessage()
|
user_info = getMessage()
|
||||||
regex = r"330 "+str(re.escape(nick))+" "+str(re.escape(username))+" \S+ :is logged in as"
|
regex = rf"330 {str(re.escape(nick))} {str(re.escape(username))} \S+ :is logged in as"
|
||||||
matches = re.finditer(regex, user_info, re.MULTILINE)
|
matches = re.finditer(regex, user_info, re.MULTILINE)
|
||||||
for match in matches:
|
for match in matches:
|
||||||
acc_name = match.group(0).split()[3]
|
acc_name = match.group(0).split()[3]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user