aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs40
1 files changed, 2 insertions, 38 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 9bdf8d7..b702beb 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -35,7 +35,7 @@ using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
36using OpenSim.Framework.User; 36using OpenSim.Framework.User;
37using OpenSim.Framework.Utilities; 37using OpenSim.Framework.Utilities;
38using OpenSim.GenericConfig; 38using OpenSim.Framework.Configuration;
39 39
40namespace OpenSim.Grid.UserServer 40namespace OpenSim.Grid.UserServer
41{ 41{
@@ -46,7 +46,6 @@ namespace OpenSim.Grid.UserServer
46 private string ConfigDll = "OpenSim.Grid.UserServer.Config.dll"; 46 private string ConfigDll = "OpenSim.Grid.UserServer.Config.dll";
47 private string StorageDll = "OpenSim.Framework.Data.MySQL.dll"; 47 private string StorageDll = "OpenSim.Framework.Data.MySQL.dll";
48 private UserConfig Cfg; 48 private UserConfig Cfg;
49 protected IGenericConfig localXMLConfig;
50 49
51 public UserManager m_userManager; 50 public UserManager m_userManager;
52 51
@@ -83,14 +82,7 @@ namespace OpenSim.Grid.UserServer
83 82
84 public void Startup() 83 public void Startup()
85 { 84 {
86 this.localXMLConfig = new XmlConfig("UserServerConfig.xml"); 85 this.Cfg = new UserConfig("USER SERVER", "UserServer_Config.xml");
87 this.localXMLConfig.LoadData();
88 this.ConfigDB(this.localXMLConfig);
89 this.localXMLConfig.Close();
90
91 MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration");
92 Cfg = this.LoadConfigDll(this.ConfigDll);
93 Cfg.InitConfig();
94 86
95 MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); 87 MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection");
96 m_userManager = new UserManager(); 88 m_userManager = new UserManager();
@@ -179,34 +171,6 @@ namespace OpenSim.Grid.UserServer
179 } 171 }
180 } 172 }
181 173
182 private UserConfig LoadConfigDll(string dllName)
183 {
184 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
185 UserConfig config = null;
186
187 foreach (Type pluginType in pluginAssembly.GetTypes())
188 {
189 if (pluginType.IsPublic)
190 {
191 if (!pluginType.IsAbstract)
192 {
193 Type typeInterface = pluginType.GetInterface("IUserConfig", true);
194
195 if (typeInterface != null)
196 {
197 IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
198 config = plug.GetConfigObject();
199 break;
200 }
201
202 typeInterface = null;
203 }
204 }
205 }
206 pluginAssembly = null;
207 return config;
208 }
209
210 public void Show(string ShowWhat) 174 public void Show(string ShowWhat)
211 { 175 {
212 } 176 }