X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fautorejoin.rb;h=14a2f29c77b0723ab19c96404815384ba7b3c4ba;hb=a51ae05ee0252576a10a77c9f92c0ce096be73aa;hp=a8d659580db3cec3eeca68beacd6f00fc795d408;hpb=730bb7f4d6f0001cdda1946703c11cc5374d9907;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/autorejoin.rb b/data/rbot/plugins/autorejoin.rb index a8d65958..14a2f29c 100644 --- a/data/rbot/plugins/autorejoin.rb +++ b/data/rbot/plugins/autorejoin.rb @@ -1,5 +1,5 @@ class AutoRejoinPlugin < Plugin - BotConfig.register BotConfigBooleanValue.new('rejoin.insult', + Config.register Config::BooleanValue.new('rejoin.insult', :default => true, :desc => "Determines if the bot will insult whoever kicked it, after rejoin") @@ -11,7 +11,7 @@ class AutoRejoinPlugin < Plugin if m.address? r = rand(10) if r > 0 - @bot.timer.add_once(r, m) {|m| + @bot.timer.add_once(r) { @bot.join m.channel @bot.say(m.channel, @bot.lang.get("insult") % m.sourcenick) if @bot.config['rejoin.insult'] }