]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - rbot/plugins/autorejoin.rb
initial import of rbot
[user/henk/code/ruby/rbot.git] / 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.join m.channel
8       @bot.say m.channel, @bot.lang.get("insult") % m.sourcenick
9     end
10   end
11 end
12
13 plugin = AutoRejoinPlugin.new
14 plugin.register("autorejoin")