diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 9ff9133..66779a2 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -44,16 +44,19 @@ namespace OpenSim.Region.Communications.Local | |||
44 | public LocalLoginService LoginServices; | 44 | public LocalLoginService LoginServices; |
45 | public LocalInventoryService InvenServices; | 45 | public LocalInventoryService InvenServices; |
46 | // public CAPSService CapsServices; | 46 | // public CAPSService CapsServices; |
47 | private LocalSettings m_settings; | ||
47 | 48 | ||
48 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage ) | 49 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings ) |
49 | : base(serversInfo, httpServer, assetCache) | 50 | : base(serversInfo, httpServer, assetCache) |
50 | { | 51 | { |
52 | m_settings = settings; | ||
53 | |||
51 | InvenServices = new LocalInventoryService(); | 54 | InvenServices = new LocalInventoryService(); |
52 | InvenServices.AddPlugin("OpenSim.Framework.Data.SQLite.dll"); | 55 | InvenServices.AddPlugin(m_settings.InventoryPlugin); |
53 | InventoryServer = InvenServices; | 56 | InventoryServer = InvenServices; |
54 | 57 | ||
55 | UserServices = new LocalUserServices(this, serversInfo); | 58 | UserServices = new LocalUserServices(this, serversInfo); |
56 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); | 59 | UserServices.AddPlugin(m_settings.UserDatabasePlugin); |
57 | UserServer = UserServices; | 60 | UserServer = UserServices; |
58 | 61 | ||
59 | InstanceServices = new LocalBackEndServices(); | 62 | InstanceServices = new LocalBackEndServices(); |
@@ -62,7 +65,7 @@ namespace OpenSim.Region.Communications.Local | |||
62 | 65 | ||
63 | //CapsServices = new CAPSService(httpServer); | 66 | //CapsServices = new CAPSService(httpServer); |
64 | 67 | ||
65 | LoginServices = new LocalLoginService(UserServices, welcomeMessage, this, serversInfo, accountsAuthenticate); | 68 | LoginServices = new LocalLoginService(UserServices, m_settings.WelcomeMessage, this, serversInfo, m_settings.AccountAuthentication); |
66 | httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); | 69 | httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); |
67 | } | 70 | } |
68 | 71 | ||
@@ -101,5 +104,27 @@ namespace OpenSim.Region.Communications.Local | |||
101 | } | 104 | } |
102 | } | 105 | } |
103 | 106 | ||
107 | public class LocalSettings | ||
108 | { | ||
109 | public string WelcomeMessage = ""; | ||
110 | public bool AccountAuthentication = false; | ||
111 | public string InventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; | ||
112 | public string UserDatabasePlugin = "OpenSim.Framework.Data.DB4o.dll"; | ||
113 | |||
114 | public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin) | ||
115 | { | ||
116 | WelcomeMessage = welcomeMessage; | ||
117 | AccountAuthentication = accountsAuthenticate; | ||
118 | if (inventoryPlugin != "") | ||
119 | { | ||
120 | InventoryPlugin = inventoryPlugin; | ||
121 | } | ||
122 | if (userPlugin != "") | ||
123 | { | ||
124 | UserDatabasePlugin = userPlugin; | ||
125 | } | ||
126 | } | ||
127 | } | ||
128 | |||
104 | } | 129 | } |
105 | } | 130 | } |