    # File lib/rbot/dbhash.rb, line 96
        def initialize(bot, key, absfilename=false)
          @bot = bot
          @key = key
          if @@env.nil?
            begin
              @@env = BDB::Env.open("#{@bot.botclass}", BDB::INIT_TRANSACTION | BDB::CREATE | BDB::RECOVER, "set_lg_max" => @@lg_max)
              debug "DBTree: environment opened with max log size #{@@env.conf['lg_max']}"
            rescue => e
              debug "DBTree: failed to open environment: #{e.pretty_inspect}. Retrying ..."
              @@env = BDB::Env.open("#{@bot.botclass}", BDB::INIT_TRANSACTION | BDB::CREATE |  BDB::RECOVER)
            end
            #@@env = BDB::Env.open("#{@bot.botclass}", BDB::CREATE | BDB::INIT_MPOOL | BDB::RECOVER)
          end

          if absfilename && File.exist?(key)
            # db already exists, use it
            @db = DBTree.open_db(key)
          elsif absfilename
            # create empty db
            @db = DBTree.create_db(key)
          elsif File.exist?(@bot.botclass + "/#{key}.db")
            # db already exists, use it
            @db = DBTree.open_db(@bot.botclass + "/#{key}.db")
          else
            # create empty db
            @db = DBTree.create_db(@bot.botclass + "/#{key}.db")
          end
        end