summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/rbot/plugins/autorejoin.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/data/rbot/plugins/autorejoin.rb b/data/rbot/plugins/autorejoin.rb
index aba46507..f057a659 100644
--- a/data/rbot/plugins/autorejoin.rb
+++ b/data/rbot/plugins/autorejoin.rb
@@ -4,10 +4,16 @@ class AutoRejoinPlugin < Plugin
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
- }
+ r = rand(10)
+ if r > 0
+ @bot.timer.add_once(r, m) {|m|
+ @bot.join m.channel
+ @bot.say m.channel, @bot.lang.get("insult") % m.sourcenick
+ }
+ else
+ @bot.join m.channel
+ @bot.say m.channel, @bot.lang.get("insult") % m.sourcenick
+ end
end
end
end