Try to handle disconnects.

This commit is contained in:
Jeremy Fincher 2004-12-15 07:04:01 +00:00
parent c73ca6941b
commit 29c9fe96cd

View File

@ -525,6 +525,14 @@ class Relay(callbacks.Privmsg):
m = ircmsgs.privmsg(channel, s) m = ircmsgs.privmsg(channel, s)
self._sendToOthers(irc, m) self._sendToOthers(irc, m)
def doError(self, irc, msg):
irc = self._getRealIrc(irc)
network = self._getIrcName(irc)
s = 'disconnected from %s (%s)' % (network, msg.args[0])
for channel in self.registryValue('channels'):
m = ircmsgs.privmsg(channel, s)
self._sendToOthers(irc, m)
def outFilter(self, irc, msg): def outFilter(self, irc, msg):
irc = self._getRealIrc(irc) irc = self._getRealIrc(irc)
if msg.command == 'PRIVMSG': if msg.command == 'PRIVMSG':