mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix output for usernames with spaces
This commit is contained in:
parent
69b25b8f4c
commit
59334a7068
|
@ -21,6 +21,8 @@ def auth_add_p_line(username, level, pwhash, salt):
|
|||
print("Warning: level ({}) contains weird symbols, config line is possibly malformed.".format(level), file=sys.stderr)
|
||||
if repr(username) != "'{}'".format(username):
|
||||
print("Warning: username ({}) contains weird symbols, config line is possibly malformed.".format(username), file=sys.stderr)
|
||||
if ' ' in username:
|
||||
username = '"{}"'.format(username)
|
||||
return "auth_add_p {} {} {} {}".format(username, level, pwhash, salt)
|
||||
|
||||
def auth_add_p_line_from_pw(username, level, password):
|
||||
|
|
Loading…
Reference in a new issue