Added supybot.plugins.Channel.alwaysRejoin.

This commit is contained in:
Jeremy Fincher 2004-04-05 10:03:13 +00:00
parent 75ef083226
commit 4697f61be2
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,6 @@
* Added supybot.plugins.Channels.alwaysRejoin, to make the bot
always rejoin when it's kicked.
* Added supybot.databases.users.hash, allowing those running bots
to specify the default hashed/unhashed state of user passwords in
the config file.

View File

@ -49,9 +49,21 @@ import ircmsgs
import schedule
import ircutils
import privmsgs
import registry
import callbacks
conf.registerPlugin('Channel')
conf.registerChannelValue(conf.supybot.plugins.Channel, 'alwaysRejoin',
register.Boolean(True, """Determines whether the bot will always try to
rejoin a channel whenever it's kicked from the channel."""))
class Channel(callbacks.Privmsg):
def doKick(self, irc, msg):
channel = msg.args[0]
if msg.args[1] == irc.nick:
if self.registryValue('alwaysRejoin', channel):
irc.sendMsg(ircmsgs.join(channel)) # Fix for keys.
def op(self, irc, msg, args, channel):
"""[<channel>] [<nick> ...]