Channel: Add hostmask of the user kicking the bot, in the logs.

This commit is contained in:
Valentin Lorentz 2013-05-21 18:30:16 +02:00
parent 3da554bde8
commit efcf9d7837

View File

@ -51,11 +51,13 @@ 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)
self.log.info('Kicked from %s by %s. Rejoining.' %
(channel, msg.prefix))
networkGroup = conf.supybot.networks.get(irc.network)
irc.sendMsg(networkGroup.channels.join(channel))
else:
self.log.info('Kicked from %s. Not auto-rejoining.' % channel)
self.log.info('Kicked from %s by %s. Not auto-rejoining.' %
(channel, msg.prefix))
def _sendMsg(self, irc, msg):
irc.queueMsg(msg)