Skip to content

Commit

Permalink
Channel: Log when the bot is kicked.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed May 21, 2013
1 parent c56f26b commit d0f50fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/Channel/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ def doKick(self, irc, msg):
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)
Expand Down

0 comments on commit d0f50fb

Please sign in to comment.