Channel: Log when the bot is kicked.

This commit is contained in:
Valentin Lorentz 2013-05-21 17:19:21 +02:00
parent c56f26b91d
commit d0f50fb388

View File

@ -51,8 +51,11 @@ class Channel(callbacks.Plugin):
channel = msg.args[0]
if msg.args[1] == irc.nick:
if self.registryValue('alwaysRejoin', channel):
self.log.info('Kicked from %s. Rejoining.' % channel)
networkGroup = conf.supybot.networks.get(irc.network)
irc.sendMsg(networkGroup.channels.join(channel))
else:
self.log.info('Kicked from %s. Not auto-rejoining.' % channel)
def _sendMsg(self, irc, msg):
irc.queueMsg(msg)