mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +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
|
* Added supybot.databases.users.hash, allowing those running bots
|
||||||
to specify the default hashed/unhashed state of user passwords in
|
to specify the default hashed/unhashed state of user passwords in
|
||||||
the config file.
|
the config file.
|
||||||
|
@ -49,9 +49,21 @@ import ircmsgs
|
|||||||
import schedule
|
import schedule
|
||||||
import ircutils
|
import ircutils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
|
import registry
|
||||||
import callbacks
|
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):
|
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):
|
def op(self, irc, msg, args, channel):
|
||||||
"""[<channel>] [<nick> ...]
|
"""[<channel>] [<nick> ...]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user