mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Added supybot.plugins.Channel.alwaysRejoin.
This commit is contained in:
parent
75ef083226
commit
4697f61be2
@ -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.
|
||||
|
@ -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> ...]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user