diff options
author | NEMESIS13cz <seke94@seznam.cz> | 2015-08-10 19:34:18 +0200 |
---|---|---|
committer | NEMESIS13cz <seke94@seznam.cz> | 2015-08-10 19:34:18 +0200 |
commit | 9b3e0d19c41c7d749ec92b05d3e330be3d4daa1a (patch) | |
tree | 3002dc36a083df7e57f9d2f53981bc653913f02d /loginsecurity.py | |
parent | 09bcc687bc1538eb7386d19d444212079ea93b0d (diff) |
Fixed error when user logs in multiple times while thread is processing hashes
Diffstat (limited to 'loginsecurity.py')
-rw-r--r-- | loginsecurity.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/loginsecurity.py b/loginsecurity.py index fd47e3e..1ecf3b3 100644 --- a/loginsecurity.py +++ b/loginsecurity.py @@ -25,10 +25,12 @@ def matches(password,user): def matches_thread(password, user): hashed = get_pass(uid(user)) if crypt.verify(password, hashed): - del logging_in[user.getName()] - msg(user, "&aLogged in successfully!") + if user.getName() in logging_in: + del logging_in[user.getName()] + msg(user, "&aLogged in successfully!") else: - msg(user, "&cInvalid password") + if user.getName() in logging_in: + msg(user, "&cInvalid password") @simplecommand("cgpass", |