示例#1
0
        public void Initialize(Scene scene, IConfigSource config)
        {
            if (!m_Enabled)
            {
                return;
            }

            //TODO: At some point, strip this out of the ini file, in Search Module,
            // we're going to recycle the Profile connection string however to make
            // life a bit easier.
            IConfig profileConfig = config.Configs["Startup"];
            string  connstr       = profileConfig.GetString("core_connection_string", String.Empty);


            m_log.Info("[PROFILE] Profile module is activated");

            //TODO: Bad assumption on my part that we're enabling it and the connstr is actually
            // valid, but I'm sick of dinking with this thing  :)
            m_Enabled = true;

            _connFactory = new ConnectionFactory("MySQL", connstr);

            string storageConnStr = profileConfig.GetString("storage_connection_string", String.Empty);

            _regionConnFactory = new ConnectionFactory("MySQL", storageConnStr);

            IMoneyModule mm = scene.RequestModuleInterface <IMoneyModule>();

            if (mm != null)
            {
                _currencyString = mm.GetCurrencySymbol();
            }

            // Hook up events
            scene.EventManager.OnNewClient += OnNewClient;
        }