diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-01-07 21:25:04 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-01-07 21:25:04 +0100 |
commit | 1bf7503c6ce53bc32cf3139e05cdfa54e9c61d5b (patch) | |
tree | 42b8de7136cc64a56d5a72a17896bf2ffbaf1b70 /data/rbot | |
parent | 63803e1e37871e1ff6323056fbbebe0cd13453e9 (diff) |
autorejoin: work on password-protected channels too
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/autorejoin.rb | 6 |
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 |