X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Fircbot.rb;h=f74b1530cd51f8d1a1d4fcd0f525cad7b2eed8f5;hb=d642da9348926e418655685b92f0b68c11b710f1;hp=34c829261a2be3c66e21274d00575008ef8629ea;hpb=269d874e9dfc9e076eb45ca22397ad2f3715aa29;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 34c82926..f74b1530 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -292,7 +292,7 @@ class Bot :desc => "The CA file used to verify the SSL connection.", :wizard => true) Config.register Config::StringValue.new('server.ssl_ca_path', - :default => '', :requires_restart => true, + :default => default_ssl_ca_path, :requires_restart => true, :desc => "Alternativly a directory that includes CA PEM files used to verify the SSL connection.", :wizard => true) Config.register Config::StringValue.new('server.password', @@ -435,7 +435,7 @@ class Bot }, :desc => "Percentage of IRC penalty to consider when sending messages to prevent being disconnected for excess flood. Set to 0 to disable penalty control.") Config.register Config::StringValue.new('core.db', - :default => default_db, + :default => default_db, :store_default => true, :wizard => true, :validate => Proc.new { |v| Registry::formats.include? v }, :requires_restart => true, @@ -504,6 +504,7 @@ class Bot end @registry_factory = Registry.new @config['core.db'] + @registry_factory.migrate_registry_folder(path) @logfile = @config['log.file'] if @logfile.class!=String || @logfile.empty? @@ -822,6 +823,11 @@ class Bot end end + def default_ssl_ca_path + file = default_ssl_ca_file + File.dirname file if file + end + # Determine if tokyocabinet is installed, if it is use it as a default. def default_db begin