Fixed error when user logs in multiple times while thread is processing hashes

This commit is contained in:
NEMESIS13cz
2015-08-10 19:34:18 +02:00
parent 09bcc687bc
commit 9b3e0d19c4

View File

@@ -25,10 +25,12 @@ def matches(password,user):
def matches_thread(password, user): def matches_thread(password, user):
hashed = get_pass(uid(user)) hashed = get_pass(uid(user))
if crypt.verify(password, hashed): if crypt.verify(password, hashed):
del logging_in[user.getName()] if user.getName() in logging_in:
msg(user, "&aLogged in successfully!") del logging_in[user.getName()]
msg(user, "&aLogged in successfully!")
else: else:
msg(user, "&cInvalid password") if user.getName() in logging_in:
msg(user, "&cInvalid password")
@simplecommand("cgpass", @simplecommand("cgpass",