summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-01-07 21:25:04 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-01-07 21:25:04 +0100
commit1bf7503c6ce53bc32cf3139e05cdfa54e9c61d5b (patch)
tree42b8de7136cc64a56d5a72a17896bf2ffbaf1b70 /data/rbot
parent63803e1e37871e1ff6323056fbbebe0cd13453e9 (diff)
autorejoin: work on password-protected channels too
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/autorejoin.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/data/rbot/plugins/autorejoin.rb b/data/rbot/plugins/autorejoin.rb
index 14a2f29c..330404cd 100644
--- a/data/rbot/plugins/autorejoin.rb
+++ b/data/rbot/plugins/autorejoin.rb
@@ -8,15 +8,17 @@ class AutoRejoinPlugin < Plugin
end
def kick(m)
+ password = m.channel.mode[:k].value
+
if m.address?
r = rand(10)
if r > 0
@bot.timer.add_once(r) {
- @bot.join m.channel
+ @bot.join m.channel, password
@bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult']
}
else
- @bot.join m.channel
+ @bot.join m.channel, password
@bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult']
end
end