summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-09 21:46:41 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-09 21:46:41 +0000
commit51cd66a19fe4b1a3a3cd1dedd5b1f37ab08ccdc8 (patch)
tree13b67e99b043441a63e0926dd34042cfa1b10c0b /lib/rbot
parent95f0a3c65db1020160c7a322f0e2f6c7276e14f3 (diff)
database: rbot will now refuse to run on bdb versions lower than 4.x, and it will recommend version 4.2 or higher
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/dbhash.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rbot/dbhash.rb b/lib/rbot/dbhash.rb
index b32da500..d793e27e 100644
--- a/lib/rbot/dbhash.rb
+++ b/lib/rbot/dbhash.rb
@@ -6,6 +6,18 @@ rescue Exception => e
exit 2
end
+if BDB::VERSION_MAJOR < 4
+ fatal "Your bdb (Berkeley DB) version #{BDB::VERSION} is too old!"
+ fatal "rbot will only run with bdb version 4 or higher, please upgrade."
+ fatal "For maximum reliability, upgrade to version 4.2 or higher."
+ raise BDB::Fatal, BDB::VERSION + " is too old"
+end
+
+if BDB::VERSION_MAJOR == 4 and BDB::VERSION_MINOR < 2
+ warning "Your bdb (Berkeley DB) version #{BDB::VERSION} may not be reliable."
+ warning "If possible, try upgrade version 4.2 or later."
+end
+
# make BTree lookups case insensitive
module BDB
class CIBtree < Btree