Fixed some uncaught exceptions and a few other places it might happen.

This commit is contained in:
Jeremy Fincher 2004-11-07 20:40:49 +00:00
parent ced5caa68f
commit 2633575d9a

View File

@ -366,6 +366,7 @@ class Relay(callbacks.Privmsg):
def punish():
punished = False
for irc in world.ircs:
if channel in irc.state.channels:
if irc.nick in irc.state.channels[channel].ops:
self.log.info('Punishing %s in %s on %s for relaying.',
msg.prefix, channel, irc.network)
@ -481,6 +482,7 @@ class Relay(callbacks.Privmsg):
network = self._getIrcName(irc)
s = 'nick change by %s to %s on %s' % (msg.nick, newNick, network)
for channel in self.registryValue('channels'):
if channel in irc.state.channels:
if newNick in irc.state.channels[channel].users:
m = ircmsgs.privmsg(channel, s)
self._sendToOthers(irc, m)