1 class AutoRejoinPlugin < Plugin
2 BotConfig.register BotConfigBooleanValue.new('rejoin.insult',
4 :desc => "Determines if the bot will insult whoever kicked it, after rejoin")
6 def help(plugin, topic="")
7 "performs an automatic rejoin if the bot is kicked from a channel"
14 @bot.timer.add_once(r, m) {|m|
16 @bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult']
20 @bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult']
26 plugin = AutoRejoinPlugin.new