From 9541057a74e533127377dfee4d3bc4831c564f8e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 3 Aug 2006 17:35:15 +0000 Subject: Make keywords.rb into a plugin and sync with 0.9.10 --- lib/rbot/registry.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rbot/registry.rb') diff --git a/lib/rbot/registry.rb b/lib/rbot/registry.rb index e679722a..cb59306c 100644 --- a/lib/rbot/registry.rb +++ b/lib/rbot/registry.rb @@ -27,14 +27,14 @@ module Irc } old.close new.close - File.delete("#{@bot.botclass}/registry.db") + File.rename("#{@bot.botclass}/registry.db", "#{@bot.botclass}/registry.db.old") end end def upgrade_data2 if File.exist?("#{@bot.botclass}/plugin_registry.db") Dir.mkdir("#{@bot.botclass}/registry") unless File.exist?("#{@bot.botclass}/registry") - env = BDB::Env.open("#{@bot.botclass}", BDB::INIT_TRANSACTION | BDB::CREATE | BDB::RECOVER) + env = BDB::Env.open("#{@bot.botclass}", BDB::INIT_TRANSACTION | BDB::CREATE | BDB::RECOVER)# | BDB::TXN_NOSYNC) dbs = Hash.new log "upgrading previous (rbot 0.9.9 or earlier) plugin registry to new split format" old = BDB::CIBtree.open("#{@bot.botclass}/plugin_registry.db", nil, -- cgit v1.2.3