def do330(self, irc, msg):
        mynick, theirnick, theiraccount, garbage = msg.args
        # I would like to use a dict comprehension, but we have to support
        # Python 2.6 :(
        self._requests = dict([(x,y) for x,y in self._requests.items()
                if y[0]+60>time.time()])
        try:
            (timestamp, prefix, irc) = self._requests.pop((irc.network, theirnick))
        except KeyError:
            return
        user = ircdb.users.getUserFromNick(irc.network, theiraccount)
        if not user:
            user = ircdb.users.getUserFromNick(irc.network, theirnick)
        if user:
            try:
                user.addAuth(prefix)
            except ValueError:
                irc.error(_('Your secure flag is true and your hostmask '
                          'doesn\'t match any of your known hostmasks.'),
                          Raise=True)
            ircdb.users.setUser(user, flush=False)
            irc.reply(_('You are now authenticated as %s.') % user.name)
        else:
            irc.error(_('No user has this nick on this network.'))
dataset/ETHPy150Open ProgVal/Limnoria/plugins/NickAuth/plugin.py/NickAuth.do330/original