public void Initialise(string opensimVersion, IConfig config, IMoneyDBService moneyDBService, IMoneyServiceCore moneyCore) { m_opensimVersion = opensimVersion; m_moneyDBService = moneyDBService; m_moneyCore = moneyCore; m_config = config; // [MoneyServer] Section m_defaultBalance = m_config.GetInt("DefaultBalance", 1000); string ftrans = m_config.GetString ("enableForceTransfer", "false"); if (ftrans.ToLower()=="true") m_forceTransfer = true; m_forceTransfer = m_config.GetBoolean("EnableForceTransfer", m_forceTransfer); string banker = m_config.GetString("BankerAvatar", ""); m_bankerAvatar = banker.ToLower(); string sendmoney = m_config.GetString ("enableScriptSendMoney", "false"); if (sendmoney.ToLower()=="true") m_scriptSendMoney = true; m_scriptSendMoney = m_config.GetBoolean("EnableScriptSendMoney", m_scriptSendMoney); m_scriptAccessKey = m_config.GetString("MoneyScriptAccessKey", ""); m_scriptIPaddress = m_config.GetString("MoneyScriptIPaddress", "127.0.0.1"); // クライアント証明書 m_certFilename = m_config.GetString("ClientCertFilename", ""); m_certPassword = m_config.GetString("ClientCertPassword", ""); if (m_certFilename!="") { m_cert = new X509Certificate2(m_certFilename, m_certPassword); Console.WriteLine("[MONEY RPC]: Initialise: Issue Authentication of Client. Cert file is " + m_cacertFilename); } // サーバ認証 string checkcert = m_config.GetString("CheckServerCert", "false"); if (checkcert.ToLower()=="true") m_checkServerCert = true; m_cacertFilename = m_config.GetString("CACertFilename", ""); if (m_cacertFilename!="") { m_certVerify.SetPrivateCA(m_cacertFilename); ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(m_certVerify.ValidateServerCertificate); Console.WriteLine("[MONEY RPC]: Initialise: Execute Authentication of Server. CA file is " + m_cacertFilename); } else { m_checkServerCert = false; ServicePointManager.ServerCertificateValidationCallback = null; } // Update Balance Messages m_BalanceMessageLandSale = m_config.GetString("BalanceMessageLandSale", m_BalanceMessageLandSale); m_BalanceMessageRcvLandSale = m_config.GetString("BalanceMessageRcvLandSale", m_BalanceMessageRcvLandSale); m_BalanceMessageSendGift = m_config.GetString("BalanceMessageSendGift", m_BalanceMessageSendGift); m_BalanceMessageReceiveGift = m_config.GetString("BalanceMessageReceiveGift", m_BalanceMessageReceiveGift); m_BalanceMessagePayCharge = m_config.GetString("BalanceMessagePayCharge", m_BalanceMessagePayCharge); m_BalanceMessageBuyObject = m_config.GetString("BalanceMessageBuyObject", m_BalanceMessageBuyObject); m_BalanceMessageGetMoney = m_config.GetString("BalanceMessageGetMoney", m_BalanceMessageGetMoney); m_BalanceMessageBuyMoney = m_config.GetString("BalanceMessageBuyMoney", m_BalanceMessageBuyMoney); m_BalanceMessageReceiveMoney = m_config.GetString("BalanceMessageReceiveMoney", m_BalanceMessageReceiveMoney); m_BalanceMessageRollBack = m_config.GetString("BalanceMessageRollBack", m_BalanceMessageRollBack); m_sessionDic = m_moneyCore.GetSessionDic(); m_secureSessionDic = m_moneyCore.GetSecureSessionDic(); m_webSessionDic = m_moneyCore.GetWebSessionDic(); RegisterHandlers(); }
public void Initialise(string opensimVersion, IConfig config, IMoneyDBService moneyDBService, IMoneyServiceCore moneyCore) { m_opensimVersion = opensimVersion; m_moneyDBService = moneyDBService; m_moneyCore = moneyCore; m_config = config; m_defaultBalance = m_config.GetInt("DefaultBalance", 1000); string ftrans = m_config.GetString ("enableForceTransfer", "false"); if (ftrans.ToLower()=="true") m_forceTransfer = true; m_forceTransfer = m_config.GetBoolean("EnableForceTransfer", m_forceTransfer); string banker = m_config.GetString("BankerAvatar", ""); m_bankerAvatar = banker.ToLower(); string sendmoney = m_config.GetString ("enableScriptSendMoney", "false"); if (sendmoney.ToLower()=="true") m_scriptSendMoney = true; m_scriptSendMoney = m_config.GetBoolean("EnableScriptSendMoney", m_scriptSendMoney); m_scriptAccessKey = m_config.GetString("MoneyScriptAccessKey", ""); m_scriptIPaddress = m_config.GetString("MoneyScriptIPaddress", "127.0.0.1"); string checkcert = m_config.GetString("CheckClientCert", "false"); if (checkcert.ToLower()=="true") m_checkClientCert = true; m_certFilename = m_config.GetString("ServerCertFilename", "SineWaveCert.pfx"); m_certPassword = m_config.GetString("ServerCertPassword", "123"); if (m_certFilename!="" && m_certPassword!="") { m_cert = new X509Certificate2(m_certFilename, m_certPassword); } // Update Balance Messages m_BalanceMessageLandSale = m_config.GetString("BalanceMessageLandSale", m_BalanceMessageLandSale); m_BalanceMessageRcvLandSale = m_config.GetString("BalanceMessageRcvLandSale", m_BalanceMessageRcvLandSale); m_BalanceMessageSendGift = m_config.GetString("BalanceMessageSendGift", m_BalanceMessageSendGift); m_BalanceMessageReceiveGift = m_config.GetString("BalanceMessageReceiveGift", m_BalanceMessageReceiveGift); m_BalanceMessagePayCharge = m_config.GetString("BalanceMessagePayCharge", m_BalanceMessagePayCharge); m_BalanceMessageBuyObject = m_config.GetString("BalanceMessageBuyObject", m_BalanceMessageBuyObject); m_BalanceMessageGetMoney = m_config.GetString("BalanceMessageGetMoney", m_BalanceMessageGetMoney); m_BalanceMessageBuyMoney = m_config.GetString("BalanceMessageBuyMoney", m_BalanceMessageBuyMoney); m_BalanceMessageReceiveMoney = m_config.GetString("BalanceMessageReceiveMoney", m_BalanceMessageReceiveMoney); m_BalanceMessageRollBack = m_config.GetString("BalanceMessageRollBack", m_BalanceMessageRollBack); m_sessionDic = m_moneyCore.GetSessionDic(); m_secureSessionDic = m_moneyCore.GetSecureSessionDic(); m_webSessionDic = m_moneyCore.GetWebSessionDic(); RegisterHandlers(); }
public void Initialise(string opensimVersion,IConfig config, IMoneyDBService moneyDBService, IMoneyServiceCore moneyCore) { m_opensimVersion = opensimVersion; m_moneyDBService = moneyDBService; m_moneyCore = moneyCore; m_config = config; m_defaultBalance = m_config.GetInt("DefaultBalance", 1000); string ftrans = m_config.GetString("enableForceTransfer", "false"); if (ftrans.ToLower()=="true") m_forceTransfer = true; string banker = m_config.GetString("BankerAvatar", ""); m_bankerAvatar = banker.ToLower(); string sendmoney = m_config.GetString("enableScriptSendMoney", "false"); if (sendmoney.ToLower()=="true") m_scriptSendMoney = true; m_scriptAccessKey = m_config.GetString("MoneyScriptAccessKey", ""); m_scriptIPaddress = m_config.GetString("MoneyScriptIPaddress", "127.0.0.1"); m_certFilename = m_config.GetString("RegionCertificateFile", ""); if (m_certFilename!="") m_useCertFile = true; // Update Balance Messages m_BalanceMessageLandSale = m_config.GetString("BalanceMessageLandSale", m_BalanceMessageLandSale); m_BalanceMessageSendGift = m_config.GetString("BalanceMessageSendGift", m_BalanceMessageSendGift); m_BalanceMessageReceiveGift = m_config.GetString("BalanceMessageReceiveGift", m_BalanceMessageReceiveGift); m_BalanceMessagePayCharge = m_config.GetString("BalanceMessagePayCharge", m_BalanceMessagePayCharge); m_BalanceMessageBuyObject = m_config.GetString("BalanceMessageBuyObject", m_BalanceMessageBuyObject); m_BalanceMessageGetMoney = m_config.GetString("BalanceMessageGetMoney", m_BalanceMessageGetMoney); m_BalanceMessageBuyMoney = m_config.GetString("BalanceMessageBuyMoney", m_BalanceMessageBuyMoney); m_BalanceMessageReceiveMoney = m_config.GetString("BalanceMessageReceiveMoney", m_BalanceMessageReceiveMoney); m_BalanceMessageRollBack = m_config.GetString("BalanceMessageRollBack", m_BalanceMessageRollBack); m_sessionDic = m_moneyCore.GetSessionDic(); m_secureSessionDic = m_moneyCore.GetSecureSessionDic(); m_webSessionDic = m_moneyCore.GetWebSessionDic(); RegisterHandlers(); }