diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-27 16:32:32 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-27 16:32:32 +0000 |
commit | 2a96c9198c1f6e13407d0999083f6ce5e0bc06fa (patch) | |
tree | b3b9247d275d9b554665bc22884104d266d2e757 /lib/rbot/plugins/autorejoin.rb | |
parent | 21949774b91eaec6ecde4eaa8ad121e2c0a36b87 (diff) |
move rbot into lib - still rearranging for packaging/installation
Diffstat (limited to 'lib/rbot/plugins/autorejoin.rb')
-rw-r--r-- | lib/rbot/plugins/autorejoin.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/rbot/plugins/autorejoin.rb b/lib/rbot/plugins/autorejoin.rb new file mode 100644 index 00000000..aba46507 --- /dev/null +++ b/lib/rbot/plugins/autorejoin.rb @@ -0,0 +1,16 @@ +class AutoRejoinPlugin < Plugin + def help(plugin, topic="") + "performs an automatic rejoin if the bot is kicked from a channel" + end + def kick(m) + if m.address? + @bot.timer.add_once(10, m) {|m| + @bot.join m.channel + @bot.say m.channel, @bot.lang.get("insult") % m.sourcenick + } + end + end +end + +plugin = AutoRejoinPlugin.new +plugin.register("autorejoin") |