From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- OpenSim/Framework/UserManager/LoginResponse.cs | 13 +++------ OpenSim/Framework/UserManager/UserManagerBase.cs | 37 +++++++++++------------- 2 files changed, 21 insertions(+), 29 deletions(-) (limited to 'OpenSim/Framework/UserManager') diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs index d1cd8cf..64504fa 100644 --- a/OpenSim/Framework/UserManager/LoginResponse.cs +++ b/OpenSim/Framework/UserManager/LoginResponse.cs @@ -1,13 +1,8 @@ using System; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading; using System.Collections; -using System.Xml; using libsecondlife; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Interfaces; using Nwc.XmlRpc; +using OpenSim.Framework.Console; namespace OpenSim.Framework.UserManagement { @@ -227,7 +222,7 @@ namespace OpenSim.Framework.UserManagement responseData["sim_port"] =(Int32) this.SimPort; responseData["sim_ip"] = this.SimAddress; - Console.MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); + MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); responseData["agent_id"] = this.AgentID.ToStringHyphenated(); responseData["session_id"] = this.SessionID.ToStringHyphenated(); responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); @@ -266,8 +261,8 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.WriteLine( - OpenSim.Framework.Console.LogPriority.LOW, + MainLog.Instance.WriteLine( + LogPriority.LOW, "LoginResponse: Error creating XML-RPC Response: " + e.Message ); return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); 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 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Data; -using libsecondlife; using System.Reflection; - -using System.Xml; +using System.Security.Cryptography; +using libsecondlife; using Nwc.XmlRpc; -using OpenSim.Framework.Sims; +using OpenSim.Framework.Console; +using OpenSim.Framework.Data; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Inventory; using OpenSim.Framework.Utilities; -using System.Security.Cryptography; - namespace OpenSim.Framework.UserManagement { public abstract class UserManagerBase { - public OpenSim.Framework.Interfaces.UserConfig _config; + public UserConfig _config; Dictionary _plugins = new Dictionary(); /// @@ -54,10 +51,10 @@ namespace OpenSim.Framework.UserManagement /// The filename to the user server plugin DLL public void AddPlugin(string FileName) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName); + MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName); Assembly pluginAssembly = Assembly.LoadFrom(FileName); - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); + MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); foreach (Type pluginType in pluginAssembly.GetTypes()) { if (!pluginType.IsAbstract) @@ -69,7 +66,7 @@ namespace OpenSim.Framework.UserManagement IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); plug.Initialise(); this._plugins.Add(plug.getName(), plug); - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface"); + MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface"); } typeInterface = null; @@ -97,7 +94,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); } } @@ -122,7 +119,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); } } @@ -149,7 +146,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); } } @@ -173,7 +170,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); } } @@ -195,7 +192,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); } } @@ -218,7 +215,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); } } @@ -314,7 +311,7 @@ namespace OpenSim.Framework.UserManagement /// Authenticated? public virtual bool AuthenticateUser(UserProfileData profile, string password) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( + MainLog.Instance.Verbose( "Authenticating " + profile.username + " " + profile.surname); password = password.Remove(0, 3); //remove $1$ @@ -517,7 +514,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); + MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); } } } -- cgit v1.1