From 7528215674749461ea70278eea6f341d63cb8350 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 11 Oct 2003 10:20:15 +0000 Subject: [PATCH] Fixed handling of secure flag by IrcUser.setAuth. --- src/ircdb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ircdb.py b/src/ircdb.py index 3d365712d..eafc20e7c 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -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."""