diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2004-10-09 01:51:05 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2004-10-09 01:51:05 +0000 |
commit | 0f3e302547363ea237454dda891ddb5de1be4476 (patch) | |
tree | ec45be24a669ee28b5e2da4ff65e39265a418e0b /rbot/plugins/autorejoin.rb |
initial import of rbot
Diffstat (limited to 'rbot/plugins/autorejoin.rb')
-rw-r--r-- | rbot/plugins/autorejoin.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rbot/plugins/autorejoin.rb b/rbot/plugins/autorejoin.rb new file mode 100644 index 00000000..03118f85 --- /dev/null +++ b/rbot/plugins/autorejoin.rb @@ -0,0 +1,14 @@ +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.join m.channel + @bot.say m.channel, @bot.lang.get("insult") % m.sourcenick + end + end +end + +plugin = AutoRejoinPlugin.new +plugin.register("autorejoin") |