]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - data/rbot/plugins/autorejoin.rb
Adapt to new auth system.
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / autorejoin.rb
1 class AutoRejoinPlugin < Plugin
2   def help(plugin, topic="")
3     "performs an automatic rejoin if the bot is kicked from a channel"
4   end
5   def kick(m)
6     if m.address?
7       @bot.timer.add_once(10, m) {|m|
8         @bot.join m.channel
9         @bot.say m.channel, @bot.lang.get("insult") % m.sourcenick
10       }
11     end
12   end
13 end
14
15 plugin = AutoRejoinPlugin.new
16 plugin.register("autorejoin")