summaryrefslogtreecommitdiff
path: root/lib/rbot/ircbot.rb
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2014-02-19 17:45:17 +0100
committerMatthias H <apoc@sixserv.org>2014-02-19 17:45:17 +0100
commit8b980642ce55d04aea4ed282154b4cd9fb1574b4 (patch)
tree6a2d06c002ad56d91babc5840ded22632e5edc76 /lib/rbot/ircbot.rb
parent7178fe47dfa606092e564dcdae48ea9586ac4a98 (diff)
[registry] registry folder with suffix, added daybreak engine
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r--lib/rbot/ircbot.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 53235edb..0a8b1aa2 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -430,9 +430,9 @@ class Bot
Config.register Config::StringValue.new('core.db',
:default => "dbm",
:wizard => true, :default => "dbm",
- :validate => Proc.new { |v| ["dbm"].include? v },
+ :validate => Proc.new { |v| ["dbm", "daybreak"].include? v },
:requires_restart => true,
- :desc => "DB adaptor to use for storing the plugin data/registries. Options: dbm (included in ruby)")
+ :desc => "DB adaptor to use for storing the plugin data/registries. Options: dbm (included in ruby), daybreak")
@argv = params[:argv]
@run_dir = params[:run_dir] || Dir.pwd
@@ -469,12 +469,6 @@ class Bot
repopulate_botclass_directory
- registry_dir = File.join(@botclass, 'registry')
- Dir.mkdir(registry_dir) unless File.exist?(registry_dir)
- unless FileTest.directory? registry_dir
- error "registry storage location #{registry_dir} is not a directory"
- exit 2
- end
save_dir = File.join(@botclass, 'safe_save')
Dir.mkdir(save_dir) unless File.exist?(save_dir)
unless FileTest.directory? save_dir
@@ -505,6 +499,8 @@ class Bot
case @config["core.db"]
when "dbm"
require 'rbot/registry/dbm'
+ when "daybreak"
+ require 'rbot/registry/daybreak'
else
raise _("Unknown DB adaptor: %s") % @config["core.db"]
end