diff options
Diffstat (limited to 'data/rbot/plugins/autorejoin.rb')
-rw-r--r-- | data/rbot/plugins/autorejoin.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/data/rbot/plugins/autorejoin.rb b/data/rbot/plugins/autorejoin.rb new file mode 100644 index 00000000..aba46507 --- /dev/null +++ b/data/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") |