More attempts to parse a input username
This commit is contained in:
@@ -91,9 +91,19 @@ async def Login(username, password,
|
||||
isBot = True
|
||||
):
|
||||
|
||||
# Try our hardest to parse whatever we've been previded
|
||||
if type(username) == str:
|
||||
if "." in username:
|
||||
username = username.split(".", 1)
|
||||
elif " " in username:
|
||||
username = username.split(" ", 1)
|
||||
|
||||
if len(username) == 1:
|
||||
username = (username[0], "resident")
|
||||
|
||||
elif len(username) != 2:
|
||||
raise ValueError("Username must be a tuple of firstname and optionally last name")
|
||||
|
||||
#WARNING:
|
||||
# Falsifying this is a violation of the Terms of Service
|
||||
mac = getMacAddress()
|
||||
|
||||
Reference in New Issue
Block a user