aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/UserManager/UserManagerBase.cs
diff options
context:
space:
mode:
authorlbsa712007-07-03 14:37:29 +0000
committerlbsa712007-07-03 14:37:29 +0000
commit9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch)
tree8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Framework/UserManager/UserManagerBase.cs
parent* Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff)
downloadopensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.zip
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.gz
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.bz2
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.xz
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Framework/UserManager/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/UserManager/UserManagerBase.cs37
1 files changed, 17 insertions, 20 deletions
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs
index 560752e..f316cc7 100644
--- a/OpenSim/Framework/UserManager/UserManagerBase.cs
+++ b/OpenSim/Framework/UserManager/UserManagerBase.cs
@@ -28,24 +28,21 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Data;
33using libsecondlife;
34using System.Reflection; 31using System.Reflection;
35 32using System.Security.Cryptography;
36using System.Xml; 33using libsecondlife;
37using Nwc.XmlRpc; 34using Nwc.XmlRpc;
38using OpenSim.Framework.Sims; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Data;
37using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Inventory; 38using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities; 39using OpenSim.Framework.Utilities;
41 40
42using System.Security.Cryptography;
43
44namespace OpenSim.Framework.UserManagement 41namespace OpenSim.Framework.UserManagement
45{ 42{
46 public abstract class UserManagerBase 43 public abstract class UserManagerBase
47 { 44 {
48 public OpenSim.Framework.Interfaces.UserConfig _config; 45 public UserConfig _config;
49 Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 46 Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
50 47
51 /// <summary> 48 /// <summary>
@@ -54,10 +51,10 @@ namespace OpenSim.Framework.UserManagement
54 /// <param name="FileName">The filename to the user server plugin DLL</param> 51 /// <param name="FileName">The filename to the user server plugin DLL</param>
55 public void AddPlugin(string FileName) 52 public void AddPlugin(string FileName)
56 { 53 {
57 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName); 54 MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName);
58 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 55 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
59 56
60 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); 57 MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
61 foreach (Type pluginType in pluginAssembly.GetTypes()) 58 foreach (Type pluginType in pluginAssembly.GetTypes())
62 { 59 {
63 if (!pluginType.IsAbstract) 60 if (!pluginType.IsAbstract)
@@ -69,7 +66,7 @@ namespace OpenSim.Framework.UserManagement
69 IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 66 IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
70 plug.Initialise(); 67 plug.Initialise();
71 this._plugins.Add(plug.getName(), plug); 68 this._plugins.Add(plug.getName(), plug);
72 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface"); 69 MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
73 } 70 }
74 71
75 typeInterface = null; 72 typeInterface = null;
@@ -97,7 +94,7 @@ namespace OpenSim.Framework.UserManagement
97 } 94 }
98 catch (Exception e) 95 catch (Exception e)
99 { 96 {
100 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 97 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
101 } 98 }
102 } 99 }
103 100
@@ -122,7 +119,7 @@ namespace OpenSim.Framework.UserManagement
122 } 119 }
123 catch (Exception e) 120 catch (Exception e)
124 { 121 {
125 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 122 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
126 } 123 }
127 } 124 }
128 125
@@ -149,7 +146,7 @@ namespace OpenSim.Framework.UserManagement
149 } 146 }
150 catch (Exception e) 147 catch (Exception e)
151 { 148 {
152 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 149 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
153 } 150 }
154 } 151 }
155 152
@@ -173,7 +170,7 @@ namespace OpenSim.Framework.UserManagement
173 } 170 }
174 catch (Exception e) 171 catch (Exception e)
175 { 172 {
176 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 173 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
177 } 174 }
178 } 175 }
179 176
@@ -195,7 +192,7 @@ namespace OpenSim.Framework.UserManagement
195 } 192 }
196 catch (Exception e) 193 catch (Exception e)
197 { 194 {
198 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 195 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
199 } 196 }
200 } 197 }
201 198
@@ -218,7 +215,7 @@ namespace OpenSim.Framework.UserManagement
218 } 215 }
219 catch (Exception e) 216 catch (Exception e)
220 { 217 {
221 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 218 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
222 } 219 }
223 } 220 }
224 221
@@ -314,7 +311,7 @@ namespace OpenSim.Framework.UserManagement
314 /// <returns>Authenticated?</returns> 311 /// <returns>Authenticated?</returns>
315 public virtual bool AuthenticateUser(UserProfileData profile, string password) 312 public virtual bool AuthenticateUser(UserProfileData profile, string password)
316 { 313 {
317 OpenSim.Framework.Console.MainLog.Instance.Verbose( 314 MainLog.Instance.Verbose(
318 "Authenticating " + profile.username + " " + profile.surname); 315 "Authenticating " + profile.username + " " + profile.surname);
319 316
320 password = password.Remove(0, 3); //remove $1$ 317 password = password.Remove(0, 3); //remove $1$
@@ -517,7 +514,7 @@ namespace OpenSim.Framework.UserManagement
517 } 514 }
518 catch (Exception e) 515 catch (Exception e)
519 { 516 {
520 OpenSim.Framework.Console.MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); 517 MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
521 } 518 }
522 } 519 }
523 } 520 }