Fix for bug #1030492, overriding IrcUser.auth's list with a tuple

This commit is contained in:
James Vega 2004-09-19 23:23:35 +00:00
parent b396a9f19e
commit e2bb35e02a

View File

@ -809,10 +809,12 @@ class Irc(IrcCommandDispatcher):
if u.auth: if u.auth:
(_, user, host) = ircutils.splitHostmask(msg.prefix) (_, user, host) = ircutils.splitHostmask(msg.prefix)
newhostmask = ircutils.joinHostmask(msg.args[0], user, host) newhostmask = ircutils.joinHostmask(msg.args[0], user, host)
log.info('Following identification for %s: %s -> %s', for (i, (when, authmask)) in enumerate(u.auth[:]):
u.name, u.auth[1], newhostmask) if ircutils.strEqual(msg.prefix, authmask):
u.auth = (u.auth[0], newhostmask) log.info('Following identification for %s: %s -> %s',
ircdb.users.setUser(id, u) u.name, authmask, newhostmask)
u.auth[i] = (u.auth[i][0], newhostmask)
ircdb.users.setUser(id, u)
def feedMsg(self, msg): def feedMsg(self, msg):
"""Called by the IrcDriver; feeds a message received.""" """Called by the IrcDriver; feeds a message received."""