diff options
* 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.cs | 37 |
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | ||
32 | using OpenSim.Framework.Data; | ||
33 | using libsecondlife; | ||
34 | using System.Reflection; | 31 | using System.Reflection; |
35 | 32 | using System.Security.Cryptography; | |
36 | using System.Xml; | 33 | using libsecondlife; |
37 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
38 | using OpenSim.Framework.Sims; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Data; | ||
37 | using OpenSim.Framework.Interfaces; | ||
39 | using OpenSim.Framework.Inventory; | 38 | using OpenSim.Framework.Inventory; |
40 | using OpenSim.Framework.Utilities; | 39 | using OpenSim.Framework.Utilities; |
41 | 40 | ||
42 | using System.Security.Cryptography; | ||
43 | |||
44 | namespace OpenSim.Framework.UserManagement | 41 | namespace 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 | } |