Fixed possible raised KeyError.

This commit is contained in:
Jeremy Fincher 2003-11-05 07:43:48 +00:00
parent 5d45c92592
commit 9e94295d34

View File

@ -467,8 +467,8 @@ class ChannelDB(callbacks.Privmsg,plugins.Toggleable,plugins.ChannelDBHandler):
try:
id = ircdb.users.getUserId(user)
except KeyError: # Maybe it was a nick. We'll look up by hostmask.
hostmask = irc.state.nickToHostmask(user)
try:
hostmask = irc.state.nickToHostmask(user)
id = ircdb.users.getUserId(hostmask)
except KeyError:
irc.error(msg, conf.replyNoUser)