mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +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):
|
def setAuth(self, hostmask):
|
||||||
"""Sets a user's authenticated hostmask. This times out in 1 hour."""
|
"""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):
|
def unsetAuth(self):
|
||||||
"""Unsets a use's authenticated hostmask."""
|
"""Unsets a use's authenticated hostmask."""
|
||||||
|
Loading…
Reference in New Issue
Block a user