mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fixed handling of secure flag by IrcUser.setAuth.
This commit is contained in:
parent
6406e29268
commit
7528215674
@ -253,7 +253,10 @@ class IrcUser(object):
|
||||
|
||||
def setAuth(self, hostmask):
|
||||
"""Sets a user's authenticated hostmask. This times out in 1 hour."""
|
||||
self.auth = (time.time(), hostmask)
|
||||
if self.checkHostmask(hostmask, useAuth=False) or not self.secure:
|
||||
self.auth = (time.time(), hostmask)
|
||||
else:
|
||||
raise ValueError, 'secure flag set, unmatched hostmask'
|
||||
|
||||
def unsetAuth(self):
|
||||
"""Unsets a use's authenticated hostmask."""
|
||||
|
Loading…
Reference in New Issue
Block a user