X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Fbotuser.rb;h=d859e9c3f3f1d74e963e4a248f533ef9d8204da4;hb=fd4fdf6c4ac9a3b55cc7a8ab1cf535d64416ddf8;hp=9a34b34194c1542dc238dff00e6618aa1a2a9ebe;hpb=a9b32eae21a10254f67653c8ce92076300ba670b;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb index 9a34b341..d859e9c3 100644 --- a/lib/rbot/botuser.rb +++ b/lib/rbot/botuser.rb @@ -19,13 +19,13 @@ module Irc BotConfig.register BotConfigStringValue.new( 'auth.password', :default => 'rbotauth', :wizard => true, - :desc => 'Password for the bot owner' ) + :desc => _('Password for the bot owner')) BotConfig.register BotConfigBooleanValue.new( 'auth.login_by_mask', :default => 'true', - :desc => 'Set false to prevent new botusers from logging in without a password when the user netmask is known') + :desc => _('Set false to prevent new botusers from logging in without a password when the user netmask is known')) BotConfig.register BotConfigBooleanValue.new( 'auth.autologin', :default => 'true', - :desc => 'Set false to prevent new botusers from recognizing IRC users without a need to manually login') + :desc => _('Set false to prevent new botusers from recognizing IRC users without a need to manually login')) # BotConfig.register BotConfigIntegerValue.new( 'auth.default_level', # :default => 10, :wizard => true, # :desc => 'The default level for new/unknown users' ) @@ -547,6 +547,10 @@ module Irc end def load_array(ary, forced) + unless ary + warn "Tried to load an empty array" + return + end raise "Won't load with unsaved changes" if @has_changes and not forced reset_hashes ary.each { |x| @@ -683,7 +687,8 @@ module Irc else # cmds = cmdtxt.split('::') # @bot.say chan, "you don't have #{cmds.last} (#{cmds.first}) permissions here" if chan - @bot.say chan, "#{user}, you don't have '#{cmdtxt}' permissions here" if chan + @bot.say chan, _("%{user}, you don't have '%{command}' permissions here") % + {:user=>user, :command=>cmdtxt} if chan return false end end