diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-01-07 22:48:46 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-01-07 22:48:46 +0100 |
commit | 53613d63b294841cd0fd8995b76f4378b1c288f6 (patch) | |
tree | d4295b6e2479a24aae9098e33b18e2f88911ec9c /data/rbot | |
parent | ed9d2da6f7421c68305102cb0a8e49fa25f65903 (diff) |
autorejoin: no-kick list
Botusers in the rejoin.no_kick_list config value can kick the bot without
risking being kicked when it rejoins
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/autorejoin.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/data/rbot/plugins/autorejoin.rb b/data/rbot/plugins/autorejoin.rb index 4966938a..75196656 100644 --- a/data/rbot/plugins/autorejoin.rb +++ b/data/rbot/plugins/autorejoin.rb @@ -10,6 +10,10 @@ class AutoRejoinPlugin < Plugin Config.register Config::BooleanValue.new('rejoin.kick', :default => false, :desc => "Determines if the bot will kick whoever kicked it, after rejoin") + Config.register Config::ArrayValue.new('rejoin.no_kick_list', + :default => ["owner"], + :desc => "List of botusers that can kick the bot without being kicked") + def initialize super @@ -24,7 +28,7 @@ class AutoRejoinPlugin < Plugin password = m.channel.mode[:k].value if m.address? - if @bot.config['rejoin.kick'] + if @bot.config['rejoin.kick'] and not @bot.config['rejoin.no_kick_list'].include? m.source.botuser.username @should_kick[m.channel.downcase] = m.sourcenick end r = rand(10) |