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:
jkhsjdhjs 2024-06-02 15:13:59 +00:00
parent 34a3f06d91
commit 51a37c4562

View File

@ -176,7 +176,7 @@ def is_registered(username):
try:
sendRaw("WHOIS "+str(username)+"\n")
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)
for match in matches:
acc_name = match.group(0).split()[3]