X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fautorejoin.rb;h=751966563a6e25e5a329c7776418fe661713fe5e;hb=bc7efe2d4b360da0276287e6cc7f6a401609c162;hp=4966938aa9be55daf0e9fb17d4e8f7f3609af26e;hpb=ed9d2da6f7421c68305102cb0a8e49fa25f65903;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git 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)