This commit is contained in:
Jeremy Fincher 2004-01-18 04:55:18 +00:00
parent 7c9675269d
commit 79fb00d8d6

View File

@ -142,12 +142,12 @@ class Herald(callbacks.Privmsg, configurable.Mixin):
def doPart(self, irc, msg): def doPart(self, irc, msg):
try: try:
id = self._getId(msg.prefix) id = self._getId(irc, msg.prefix)
self.lastParts[(id, msg.args[0])] = time.time() self.lastParts[(id, msg.args[0])] = time.time()
except KeyError: except KeyError:
pass pass
def _getId(self, userNickHostmask): def _getId(self, irc, userNickHostmask):
try: try:
id = ircdb.users.getUserId(userNickHostmask) id = ircdb.users.getUserId(userNickHostmask)
except KeyError: except KeyError:
@ -168,7 +168,7 @@ class Herald(callbacks.Privmsg, configurable.Mixin):
channel = privmsgs.getChannel(msg, args) channel = privmsgs.getChannel(msg, args)
(userNickHostmask, herald) = privmsgs.getArgs(args, required=2) (userNickHostmask, herald) = privmsgs.getArgs(args, required=2)
try: try:
id = self._getId(userNickHostmask) id = self._getId(irc, userNickHostmask)
except KeyError: except KeyError:
irc.errorNoUser() irc.errorNoUser()
return return
@ -186,7 +186,7 @@ class Herald(callbacks.Privmsg, configurable.Mixin):
channel = privmsgs.getChannel(msg, args) channel = privmsgs.getChannel(msg, args)
userNickHostmask = privmsgs.getArgs(args) userNickHostmask = privmsgs.getArgs(args)
try: try:
id = self._getId(userNickHostmask) id = self._getId(irc, userNickHostmask)
except KeyError: except KeyError:
irc.errorNoUser() irc.errorNoUser()
return return