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 --- .../Communications/CommunicationsManager.cs | 10 +--- OpenSim/Framework/Communications/IGridServices.cs | 3 - .../Communications/IInterRegionCommunications.cs | 7 +-- OpenSim/Framework/Communications/IUserServices.cs | 4 -- .../Communications/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/Console/AssemblyInfo.cs | 2 - OpenSim/Framework/Console/ConsoleCallbacksBase.cs | 4 -- OpenSim/Framework/Console/LogBase.cs | 12 ++-- OpenSim/Framework/Console/MainLog.cs | 2 - OpenSim/Framework/Data.DB4o/DB4oGridData.cs | 4 -- OpenSim/Framework/Data.DB4o/DB4oManager.cs | 2 - OpenSim/Framework/Data.DB4o/DB4oUserData.cs | 3 - .../Framework/Data.DB4o/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | 22 +++---- OpenSim/Framework/Data.MSSQL/MSSQLManager.cs | 7 +-- .../Data.MSSQL/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/Data.MySQL/MySQLGridData.cs | 30 +++++----- OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | 22 +++---- OpenSim/Framework/Data.MySQL/MySQLLogData.cs | 2 - OpenSim/Framework/Data.MySQL/MySQLManager.cs | 51 +++++++--------- OpenSim/Framework/Data.MySQL/MySQLUserData.cs | 15 +++-- .../Data.MySQL/Properties/AssemblyInfo.cs | 2 - .../Data.SQLite/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | 22 +++---- OpenSim/Framework/Data.SQLite/SQLiteManager.cs | 7 +-- OpenSim/Framework/Data/GridData.cs | 8 +-- OpenSim/Framework/Data/ILogData.cs | 4 -- OpenSim/Framework/Data/IniConfig.cs | 4 -- OpenSim/Framework/Data/InventoryData.cs | 2 - OpenSim/Framework/Data/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/Data/ReservationData.cs | 4 -- OpenSim/Framework/Data/SimProfileData.cs | 8 +-- OpenSim/Framework/Data/UserData.cs | 3 - OpenSim/Framework/Data/UserProfileData.cs | 2 - OpenSim/Framework/General/AgentInventory.cs | 2 - .../Framework/General/AuthenticateSessionBase.cs | 2 - OpenSim/Framework/General/BlockingQueue.cs | 4 +- OpenSim/Framework/General/IRegionCommsListener.cs | 5 +- .../General/Interfaces/AuthenticateResponse.cs | 8 --- .../General/Interfaces/Config/IGenericConfig.cs | 4 -- .../General/Interfaces/Config/IGridConfig.cs | 4 -- .../General/Interfaces/Config/IUserConfig.cs | 4 -- .../Framework/General/Interfaces/IAssetServer.cs | 5 -- OpenSim/Framework/General/Interfaces/IClientAPI.cs | 5 +- .../Framework/General/Interfaces/ILocalStorage.cs | 1 - .../Framework/General/Interfaces/IUserServer.cs | 5 +- OpenSim/Framework/General/Interfaces/IWorld.cs | 3 - OpenSim/Framework/General/LoginService.cs | 7 --- .../Framework/General/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/General/RegionCommsListener.cs | 6 +- OpenSim/Framework/General/Remoting.cs | 3 +- OpenSim/Framework/General/SimProfile.cs | 3 - OpenSim/Framework/General/Types/AgentCiruitData.cs | 3 - OpenSim/Framework/General/Types/AgentWearable.cs | 3 - OpenSim/Framework/General/Types/AssetBase.cs | 3 - OpenSim/Framework/General/Types/AssetLandmark.cs | 4 +- OpenSim/Framework/General/Types/AssetStorage.cs | 3 - OpenSim/Framework/General/Types/EstateSettings.cs | 8 +-- OpenSim/Framework/General/Types/Login.cs | 3 - OpenSim/Framework/General/Types/MapBlockData.cs | 2 - OpenSim/Framework/General/Types/NeighbourInfo.cs | 8 --- .../Framework/General/Types/NetworkServersInfo.cs | 29 +++++---- OpenSim/Framework/General/Types/ParcelData.cs | 9 +-- OpenSim/Framework/General/Types/PrimData.cs | 2 - .../Framework/General/Types/PrimitiveBaseShape.cs | 5 -- OpenSim/Framework/General/Types/RegionHandle.cs | 2 - OpenSim/Framework/General/Types/RegionInfo.cs | 41 +++++++------ OpenSim/Framework/General/Types/UUID.cs | 2 - OpenSim/Framework/General/UserProfile.cs | 4 +- OpenSim/Framework/General/Util.cs | 2 - .../GenericConfig/Xml/Properties/AssemblyInfo.cs | 2 - OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs | 5 +- OpenSim/Framework/Servers/BaseHttpServer.cs | 19 +++--- OpenSim/Framework/Servers/CheckSumServer.cs | 15 ----- OpenSim/Framework/Servers/ILlsdMethodHandler.cs | 30 +++++++++- OpenSim/Framework/Servers/LlsdMethod.cs | 30 +++++++++- OpenSim/Framework/Servers/RestMethod.cs | 4 -- OpenSim/Framework/Servers/UDPServerBase.cs | 8 --- OpenSim/Framework/Servers/XmlRpcMethod.cs | 1 - OpenSim/Framework/UserManager/LoginResponse.cs | 13 ++-- OpenSim/Framework/UserManager/UserManagerBase.cs | 37 ++++++------ OpenSim/Grid/AssetServer/AssetHttpServer.cs | 15 ++--- OpenSim/Grid/AssetServer/Main.cs | 24 +++----- .../Grid/AssetServer/Properties/AssemblyInfo.cs | 2 - .../Grid/Framework.Manager/GridManagementAgent.cs | 6 +- .../Grid/Framework.Manager/GridServerManager.cs | 3 +- OpenSim/Grid/GridServer.Config/AssemblyInfo.cs | 2 - OpenSim/Grid/GridServer.Config/DbGridConfig.cs | 55 +++++++++-------- OpenSim/Grid/GridServer/GridManager.cs | 41 +++++++------ OpenSim/Grid/GridServer/Main.cs | 14 ++--- OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs | 2 - OpenSim/Grid/UserServer.Config/AssemblyInfo.cs | 2 - OpenSim/Grid/UserServer.Config/DbUserConfig.cs | 35 ++++++----- OpenSim/Grid/UserServer/Main.cs | 17 ++---- OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs | 2 - OpenSim/Grid/UserServer/UserManager.cs | 13 +--- OpenSim/Region/Application/Application.cs | 8 +-- OpenSim/Region/Application/OpenSimMain.cs | 52 ++++++---------- OpenSim/Region/Application/VersionInfo.cs | 2 - OpenSim/Region/Caches/AssetCache.cs | 17 +++--- OpenSim/Region/Caches/Properties/AssemblyInfo.cs | 2 - OpenSim/Region/Capabilities/Caps.cs | 11 ++-- OpenSim/Region/Capabilities/LLSDArray.cs | 3 - OpenSim/Region/Capabilities/LLSDCapEvent.cs | 4 -- OpenSim/Region/Capabilities/LLSDCapsDetails.cs | 4 -- OpenSim/Region/Capabilities/LLSDEmpty.cs | 4 -- OpenSim/Region/Capabilities/LLSDHelpers.cs | 9 ++- OpenSim/Region/Capabilities/LLSDMapLayer.cs | 4 -- .../Region/Capabilities/LLSDMapLayerResponse.cs | 4 -- OpenSim/Region/Capabilities/LLSDMapRequest.cs | 4 -- OpenSim/Region/Capabilities/LLSDTest.cs | 4 -- OpenSim/Region/Capabilities/LLSDType.cs | 2 - OpenSim/Region/Capabilities/LLSDUploadReply.cs | 5 +- .../Region/ClientStack/Assets/InventoryCache.cs | 17 +++--- .../ClientStack/ClientStackNetworkHandler.cs | 6 -- OpenSim/Region/ClientStack/ClientView.API.cs | 44 +++++++------- .../ClientStack/ClientView.AgentAssetUpload.cs | 7 +-- .../ClientStack/ClientView.PacketHandlers.cs | 23 ++----- .../ClientStack/ClientView.ProcessPackets.cs | 16 ++--- OpenSim/Region/ClientStack/ClientView.cs | 30 +++++----- OpenSim/Region/ClientStack/ClientViewBase.cs | 23 ++++--- OpenSim/Region/ClientStack/PacketServer.cs | 8 +-- .../Region/ClientStack/RegionApplicationBase.cs | 23 ++----- OpenSim/Region/ClientStack/UDPServer.cs | 19 ++---- .../Communications/Local/CommunicationsLocal.cs | 9 +-- .../Communications/Local/LocalBackEndServices.cs | 6 +- .../Communications/Local/LocalUserServices.cs | 10 +--- .../Local/Properties/AssemblyInfo.cs | 2 - .../Communications/OGS1/CommunicationsOGS1.cs | 6 +- .../Region/Communications/OGS1/OGS1GridServices.cs | 26 ++++---- .../Communications/OGS1/OGS1InterSimComms.cs | 11 ++-- .../Region/Communications/OGS1/OGS1UserServices.cs | 8 +-- .../Communications/OGS1/Properties/AssemblyInfo.cs | 2 - OpenSim/Region/Environment/EstateManager.cs | 33 +++++----- OpenSim/Region/Environment/ParcelManager.cs | 13 ++-- OpenSim/Region/Environment/RegionManager.cs | 8 +-- OpenSim/Region/Environment/Scenes/Entity.cs | 5 +- OpenSim/Region/Environment/Scenes/EntityBase.cs | 6 +- .../Environment/Scenes/IScenePresenceBody.cs | 5 -- OpenSim/Region/Environment/Scenes/Primitive.cs | 7 +-- OpenSim/Region/Environment/Scenes/PrimitiveOld.cs | 13 ++-- .../Environment/Scenes/Scene.PacketHandlers.cs | 8 +-- OpenSim/Region/Environment/Scenes/Scene.cs | 70 ++++++++++------------ OpenSim/Region/Environment/Scenes/SceneBase.cs | 17 ++---- OpenSim/Region/Environment/Scenes/SceneEvents.cs | 8 +-- OpenSim/Region/Environment/Scenes/SceneObject.cs | 5 +- .../Environment/Scenes/ScenePresence.Animations.cs | 6 +- .../Environment/Scenes/ScenePresence.Body.cs | 5 -- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 17 +++--- .../Scenes/scripting/Engines/CSharpScriptEngine.cs | 11 ++-- .../Scenes/scripting/Engines/JScriptEngine.cs | 11 ++-- .../Region/Environment/Scenes/scripting/Script.cs | 9 +-- .../Environment/Scenes/scripting/ScriptInfo.cs | 8 +-- .../Environment/Scenes/scripting/ScriptManager.cs | 14 ++--- .../Region/Examples/SimpleApp/LlsdMethodEntry.cs | 9 +-- OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 16 ++--- OpenSim/Region/Examples/SimpleApp/Program.cs | 25 ++++---- .../Examples/SimpleApp/Properties/AssemblyInfo.cs | 2 - .../Region/GridInterfaces/Local/AssemblyInfo.cs | 2 - .../GridInterfaces/Local/LocalAssetServer.cs | 28 ++++----- .../Region/GridInterfaces/Remote/AssemblyInfo.cs | 2 - .../GridInterfaces/Remote/RemoteAssetServer.cs | 10 ++-- .../Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 - .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 +- OpenSim/Region/Physics/Manager/AssemblyInfo.cs | 2 - OpenSim/Region/Physics/Manager/PhysicsActor.cs | 12 ++-- OpenSim/Region/Physics/Manager/PhysicsManager.cs | 8 +-- OpenSim/Region/Physics/Manager/PhysicsScene.cs | 11 ++-- OpenSim/Region/Physics/Manager/PhysicsVector.cs | 4 -- OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs | 2 - OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 17 +++--- OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs | 2 - OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 9 +-- .../LocalStorageBerkeleyDB/BDBLocalStorage.cs | 9 +-- .../Storage/LocalStorageDb4o/AssemblyInfo.cs | 2 - .../Storage/LocalStorageDb4o/Db4LocalStorage.cs | 24 ++++---- .../Region/Storage/LocalStorageDb4o/MapStorage.cs | 4 -- .../Storage/LocalStorageDb4o/UUIDParcelQuery.cs | 5 -- .../Storage/LocalStorageDb4o/UUIDPrimQuery.cs | 5 -- .../LocalStorageSQLite/Properties/AssemblyInfo.cs | 2 - .../LocalStorageSQLite/SQLiteLocalStorage.cs | 14 ++--- .../Properties/AssemblyInfo.cs | 2 - .../Region/Terrain.BasicTerrain/TerrainEngine.cs | 49 +++++++-------- .../Region/Terrain.BasicTerrain/TerrainFilter.cs | 8 +-- 184 files changed, 693 insertions(+), 1195 deletions(-) diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 48ff40e..f90e766 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -25,16 +25,12 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; -using System.Collections.Generic; using System.Text; -using OpenSim.Framework; +using libsecondlife; +using libsecondlife.Packets; using OpenSim.Framework.Data; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using libsecondlife; -using libsecondlife.Packets; namespace OpenSim.Framework.Communications { @@ -54,7 +50,7 @@ namespace OpenSim.Framework.Communications #region Packet Handlers public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) { - System.Text.Encoding enc = System.Text.Encoding.ASCII; + Encoding enc = Encoding.ASCII; UserProfileData profileData = this.UserServer.GetUserProfile(uuid); if (profileData != null) { diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index a4812fb..c168c20 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs @@ -26,11 +26,8 @@ * */ -using System; using System.Collections.Generic; -using System.Text; using OpenSim.Framework.Types; -using OpenSim.Framework; namespace OpenSim.Framework.Communications { diff --git a/OpenSim/Framework/Communications/IInterRegionCommunications.cs b/OpenSim/Framework/Communications/IInterRegionCommunications.cs index 7b0d340..55f12ac 100644 --- a/OpenSim/Framework/Communications/IInterRegionCommunications.cs +++ b/OpenSim/Framework/Communications/IInterRegionCommunications.cs @@ -25,17 +25,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; +using libsecondlife; using OpenSim.Framework.Types; -using OpenSim.Framework; namespace OpenSim.Framework.Communications { public interface IInterRegionCommunications { bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); - bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position); + bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position); } } diff --git a/OpenSim/Framework/Communications/IUserServices.cs b/OpenSim/Framework/Communications/IUserServices.cs index 37f4942..0b1f86c 100644 --- a/OpenSim/Framework/Communications/IUserServices.cs +++ b/OpenSim/Framework/Communications/IUserServices.cs @@ -25,11 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; - using OpenSim.Framework.Data; namespace OpenSim.Framework.Communications diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs index 83e7dd4..09f6473 100644 --- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs index 8f715d2..30f6167 100644 --- a/OpenSim/Framework/Console/AssemblyInfo.cs +++ b/OpenSim/Framework/Console/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs index e3847be..346cfe6 100644 --- a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs +++ b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Framework.Console { public interface conscmd_callback diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index a4a17e9..f73e15e 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs @@ -120,7 +120,7 @@ namespace OpenSim.Framework.Console return; } - private void WriteNewLine(System.ConsoleColor color, string format, params object[] args) + private void WriteNewLine(ConsoleColor color, string format, params object[] args) { Log.WriteLine(format, args); Log.Flush(); @@ -132,7 +132,7 @@ namespace OpenSim.Framework.Console System.Console.WriteLine(format, args); System.Console.ResetColor(); } - catch (System.ArgumentNullException) + catch (ArgumentNullException) { // Some older systems dont support coloured text. System.Console.WriteLine(format, args); @@ -162,14 +162,14 @@ namespace OpenSim.Framework.Console while (true) { - addressStr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt(prompt, defaultvalue); + addressStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); if (IPAddress.TryParse(addressStr, out address)) { break; } else { - OpenSim.Framework.Console.MainLog.Instance.Error("Illegal address. Please re-enter."); + MainLog.Instance.Error("Illegal address. Please re-enter."); } } @@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console while (true) { - portStr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt(prompt, defaultvalue); + portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); if (int.TryParse(portStr, out port)) { if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort) @@ -192,7 +192,7 @@ namespace OpenSim.Framework.Console } } - OpenSim.Framework.Console.MainLog.Instance.Error("Illegal address. Please re-enter."); + MainLog.Instance.Error("Illegal address. Please re-enter."); } return port; diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainLog.cs index d7f945e..7d52622 100644 --- a/OpenSim/Framework/Console/MainLog.cs +++ b/OpenSim/Framework/Console/MainLog.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; - namespace OpenSim.Framework.Console { public class MainLog { diff --git a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs index dc8488e..1aaa775 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs @@ -27,12 +27,8 @@ */ using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Data; using libsecondlife; - namespace OpenSim.Framework.Data.DB4o { /// diff --git a/OpenSim/Framework/Data.DB4o/DB4oManager.cs b/OpenSim/Framework/Data.DB4o/DB4oManager.cs index bd4cea8..0df6350 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oManager.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oManager.cs @@ -27,9 +27,7 @@ */ using System; using System.Collections.Generic; -using System.Text; using Db4objects.Db4o; -using OpenSim.Framework.Data; using libsecondlife; namespace OpenSim.Framework.Data.DB4o diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs index 3ab0073..2e33ab0 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs @@ -26,9 +26,6 @@ * */ using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Data; using libsecondlife; namespace OpenSim.Framework.Data.DB4o diff --git a/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs index 68395a1..905cd9b 100644 --- a/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 5bdceaf..ca9196a5 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs @@ -27,8 +27,10 @@ */ using System; using System.Collections.Generic; +using System.Data; +using System.Security.Cryptography; using System.Text; -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.MSSQL { @@ -99,8 +101,8 @@ namespace OpenSim.Framework.Data.MSSQL Dictionary param = new Dictionary(); param["handle"] = handle.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -114,13 +116,13 @@ namespace OpenSim.Framework.Data.MSSQL /// /// The region UUID /// The sim profile - public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) + public SimProfileData GetProfileByLLUUID(LLUUID uuid) { Dictionary param = new Dictionary(); param["uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -153,7 +155,7 @@ namespace OpenSim.Framework.Data.MSSQL /// The attempted regionHandle of the challenger /// The secret /// Whether the secret and regionhandle match the database entry for UUID - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 @@ -174,10 +176,10 @@ namespace OpenSim.Framework.Data.MSSQL /// /// /// - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) { - System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); - System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); + SHA512Managed HashProvider = new SHA512Managed(); + ASCIIEncoding TextProvider = new ASCIIEncoding(); byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] hash = HashProvider.ComputeHash(stream); diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs index 3c83c1f..49bf31c 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs @@ -27,12 +27,9 @@ */ using System; using System.Collections.Generic; -using System.Text; using System.Data; - using System.Data.SqlClient; - -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.MSSQL { @@ -110,7 +107,7 @@ namespace OpenSim.Framework.Data.MSSQL // Region Main regionprofile.regionHandle = (ulong)reader["regionHandle"]; regionprofile.regionName = (string)reader["regionName"]; - regionprofile.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); + regionprofile.UUID = new LLUUID((string)reader["uuid"]); // Secrets regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; diff --git a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs index af310e8..066c739 100644 --- a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs index 43e3054..ef643d2 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs @@ -27,8 +27,10 @@ */ using System; using System.Collections.Generic; +using System.Data; +using System.Security.Cryptography; using System.Text; -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.MySQL { @@ -104,8 +106,8 @@ namespace OpenSim.Framework.Data.MySQL param["?xmax"] = xmax.ToString(); param["?ymax"] = ymax.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row; @@ -144,8 +146,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?handle"] = handle.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.readSimRow(reader); reader.Close(); @@ -167,7 +169,7 @@ namespace OpenSim.Framework.Data.MySQL /// /// The region UUID /// The sim profile - public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) + public SimProfileData GetProfileByLLUUID(LLUUID uuid) { try { @@ -176,8 +178,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.readSimRow(reader); reader.Close(); @@ -221,7 +223,7 @@ namespace OpenSim.Framework.Data.MySQL /// The attempted regionHandle of the challenger /// The secret /// Whether the secret and regionhandle match the database entry for UUID - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 @@ -242,10 +244,10 @@ namespace OpenSim.Framework.Data.MySQL /// /// /// - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) { - System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); - System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); + SHA512Managed HashProvider = new SHA512Managed(); + ASCIIEncoding TextProvider = new ASCIIEncoding(); byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] hash = HashProvider.ComputeHash(stream); @@ -262,8 +264,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?x"] = x.ToString(); param["?y"] = y.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param); + IDataReader reader = result.ExecuteReader(); ReservationData row = database.readReservationRow(reader); reader.Close(); diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index 434df1a..790759a 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs @@ -27,7 +27,7 @@ */ using System; using System.Collections.Generic; -using System.Text; +using System.Data; using libsecondlife; namespace OpenSim.Framework.Data.MySQL @@ -98,8 +98,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = folderID.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); List items = database.readInventoryItems(reader); @@ -132,8 +132,8 @@ namespace OpenSim.Framework.Data.MySQL param["?uuid"] = user.ToStringHyphenated(); param["?zero"] = LLUUID.Zero.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); List items = database.readInventoryFolders(reader); @@ -165,8 +165,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = parentID.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); List items = database.readInventoryFolders(reader); @@ -198,8 +198,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = item.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); List items = database.readInventoryItems(reader); @@ -238,8 +238,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = folder.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); List items = database.readInventoryFolders(reader); diff --git a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs index 8265614..66f3399 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs @@ -26,8 +26,6 @@ * */ using System; -using System.Collections.Generic; -using System.Text; namespace OpenSim.Framework.Data.MySQL { diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index b2f398b..ab478ed 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -27,17 +27,10 @@ */ using System; using System.Collections.Generic; -using System.Text; using System.Data; - -// MySQL Native -using MySql; -using MySql.Data; -using MySql.Data.Types; +using libsecondlife; using MySql.Data.MySqlClient; -using OpenSim.Framework.Data; - namespace OpenSim.Framework.Data.MySQL { /// @@ -71,7 +64,7 @@ namespace OpenSim.Framework.Data.MySQL dbcon.Open(); - System.Console.WriteLine("MySQL connection established"); + Console.WriteLine("MySQL connection established"); } catch (Exception e) { @@ -187,7 +180,7 @@ namespace OpenSim.Framework.Data.MySQL // Region Main retval.regionHandle = Convert.ToUInt64(reader["regionHandle"].ToString()); retval.regionName = (string)reader["regionName"]; - retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); + retval.UUID = new LLUUID((string)reader["uuid"]); // Secrets retval.regionRecvKey = (string)reader["regionRecvKey"]; @@ -226,11 +219,11 @@ namespace OpenSim.Framework.Data.MySQL string tempRegionMap = reader["regionMapTexture"].ToString(); if (tempRegionMap != "") { - retval.regionMapTextureID = new libsecondlife.LLUUID(tempRegionMap); + retval.regionMapTextureID = new LLUUID(tempRegionMap); } else { - retval.regionMapTextureID = new libsecondlife.LLUUID(); + retval.regionMapTextureID = new LLUUID(); } } else @@ -259,7 +252,7 @@ namespace OpenSim.Framework.Data.MySQL retval.reservationMinY = (int)reader["resYMin"]; retval.reservationName = (string)reader["resName"]; retval.status = (bool)reader["status"]; - retval.userUUID = new libsecondlife.LLUUID((string)reader["userUUID"]); + retval.userUUID = new LLUUID((string)reader["userUUID"]); } else @@ -280,9 +273,9 @@ namespace OpenSim.Framework.Data.MySQL if (reader.Read()) { // Agent IDs - retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]); - retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]); - retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]); + retval.UUID = new LLUUID((string)reader["UUID"]); + retval.sessionID = new LLUUID((string)reader["sessionID"]); + retval.secureSessionID = new LLUUID((string)reader["secureSessionID"]); // Agent Who? retval.agentIP = (string)reader["agentIP"]; @@ -296,7 +289,7 @@ namespace OpenSim.Framework.Data.MySQL // Current position retval.currentRegion = (string)reader["currentRegion"]; retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString()); - libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); + LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); } else { @@ -316,7 +309,7 @@ namespace OpenSim.Framework.Data.MySQL if (reader.Read()) { - retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]); + retval.UUID = new LLUUID((string)reader["UUID"]); retval.username = (string)reader["username"]; retval.surname = (string)reader["lastname"]; @@ -324,11 +317,11 @@ namespace OpenSim.Framework.Data.MySQL retval.passwordSalt = (string)reader["passwordSalt"]; retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); - retval.homeLocation = new libsecondlife.LLVector3( + retval.homeLocation = new LLVector3( Convert.ToSingle(reader["homeLocationX"].ToString()), Convert.ToSingle(reader["homeLocationY"].ToString()), Convert.ToSingle(reader["homeLocationZ"].ToString())); - retval.homeLookAt = new libsecondlife.LLVector3( + retval.homeLookAt = new LLVector3( Convert.ToSingle(reader["homeLookAtX"].ToString()), Convert.ToSingle(reader["homeLookAtY"].ToString()), Convert.ToSingle(reader["homeLookAtZ"].ToString())); @@ -345,8 +338,8 @@ namespace OpenSim.Framework.Data.MySQL retval.profileAboutText = (string)reader["profileAboutText"]; retval.profileFirstText = (string)reader["profileFirstText"]; - retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]); - retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]); + retval.profileImage = new LLUUID((string)reader["profileImage"]); + retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]); } else @@ -371,9 +364,9 @@ namespace OpenSim.Framework.Data.MySQL { InventoryFolderBase folder = new InventoryFolderBase(); - folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]); - folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); - folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]); + folder.agentID = new LLUUID((string)reader["agentID"]); + folder.parentID = new LLUUID((string)reader["parentFolderID"]); + folder.folderID = new LLUUID((string)reader["folderID"]); folder.name = (string)reader["folderName"]; rows.Add(folder); @@ -402,14 +395,14 @@ namespace OpenSim.Framework.Data.MySQL { InventoryItemBase item = new InventoryItemBase(); - item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]); - item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]); + item.assetID = new LLUUID((string)reader["assetID"]); + item.avatarID = new LLUUID((string)reader["avatarID"]); item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString()); item.inventoryDescription = (string)reader["inventoryDescription"]; - item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]); + item.inventoryID = new LLUUID((string)reader["inventoryID"]); item.inventoryName = (string)reader["inventoryName"]; item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString()); - item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); + item.parentFolderID = new LLUUID((string)reader["parentFolderID"]); item.type = Convert.ToInt32(reader["type"].ToString()); rows.Add(item); diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs index 0304452..c116536 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs @@ -27,8 +27,7 @@ */ using System; using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Data; +using System.Data; using libsecondlife; namespace OpenSim.Framework.Data.MySQL @@ -87,8 +86,8 @@ namespace OpenSim.Framework.Data.MySQL param["?first"] = user; param["?second"] = last; - System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param); + IDataReader reader = result.ExecuteReader(); UserProfileData row = database.readUserRow(reader); @@ -120,8 +119,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); UserProfileData row = database.readUserRow(reader); @@ -175,8 +174,8 @@ namespace OpenSim.Framework.Data.MySQL Dictionary param = new Dictionary(); param["?uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param); + IDataReader reader = result.ExecuteReader(); UserAgentData row = database.readAgentRow(reader); diff --git a/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs index d67ccf6..52d6a54 100644 --- a/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs index f811825..9de5edb 100644 --- a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs index 800e26c..511c5f0 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs @@ -27,8 +27,10 @@ */ using System; using System.Collections.Generic; +using System.Data; +using System.Security.Cryptography; using System.Text; -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.SQLite { @@ -99,8 +101,8 @@ namespace OpenSim.Framework.Data.SQLite Dictionary param = new Dictionary(); param["handle"] = handle.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -114,13 +116,13 @@ namespace OpenSim.Framework.Data.SQLite /// /// The region UUID /// The sim profile - public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) + public SimProfileData GetProfileByLLUUID(LLUUID uuid) { Dictionary param = new Dictionary(); param["uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -153,7 +155,7 @@ namespace OpenSim.Framework.Data.SQLite /// The attempted regionHandle of the challenger /// The secret /// Whether the secret and regionhandle match the database entry for UUID - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 @@ -174,10 +176,10 @@ namespace OpenSim.Framework.Data.SQLite /// /// /// - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) { - System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); - System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); + SHA512Managed HashProvider = new SHA512Managed(); + ASCIIEncoding TextProvider = new ASCIIEncoding(); byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] hash = HashProvider.ComputeHash(stream); diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs index 3397e0d..c9931ab 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs @@ -27,12 +27,9 @@ */ using System; using System.Collections.Generic; -using System.Text; using System.Data; - using System.Data.SQLite; - -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.SQLite { @@ -105,7 +102,7 @@ namespace OpenSim.Framework.Data.SQLite // Region Main retval.regionHandle = (ulong)reader["regionHandle"]; retval.regionName = (string)reader["regionName"]; - retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); + retval.UUID = new LLUUID((string)reader["uuid"]); // Secrets retval.regionRecvKey = (string)reader["regionRecvKey"]; diff --git a/OpenSim/Framework/Data/GridData.cs b/OpenSim/Framework/Data/GridData.cs index 7f8fdaf..5a17d20 100644 --- a/OpenSim/Framework/Data/GridData.cs +++ b/OpenSim/Framework/Data/GridData.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; +using libsecondlife; namespace OpenSim.Framework.Data { @@ -56,7 +54,7 @@ namespace OpenSim.Framework.Data /// /// A 128bit UUID /// A sim profile - SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID); + SimProfileData GetProfileByLLUUID(LLUUID UUID); /// /// Returns all profiles within the specified range @@ -76,7 +74,7 @@ namespace OpenSim.Framework.Data /// The regionhandle sent by the sim /// The recieving key sent by the sim /// Whether the sim has been authenticated - bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); + bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); /// /// Initialises the interface diff --git a/OpenSim/Framework/Data/ILogData.cs b/OpenSim/Framework/Data/ILogData.cs index ccb3b84..059fef5 100644 --- a/OpenSim/Framework/Data/ILogData.cs +++ b/OpenSim/Framework/Data/ILogData.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Framework.Data { /// diff --git a/OpenSim/Framework/Data/IniConfig.cs b/OpenSim/Framework/Data/IniConfig.cs index 2f002c1..2b52fd1 100644 --- a/OpenSim/Framework/Data/IniConfig.cs +++ b/OpenSim/Framework/Data/IniConfig.cs @@ -25,12 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using System.IO; using System.Text.RegularExpressions; - /* Taken from public code listing at by Alex Pinsker http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html diff --git a/OpenSim/Framework/Data/InventoryData.cs b/OpenSim/Framework/Data/InventoryData.cs index 8a3a664..c2a1d06 100644 --- a/OpenSim/Framework/Data/InventoryData.cs +++ b/OpenSim/Framework/Data/InventoryData.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Data diff --git a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs index 7d749d5..f9260a1 100644 --- a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/Data/ReservationData.cs b/OpenSim/Framework/Data/ReservationData.cs index f404ebd..0078df0 100644 --- a/OpenSim/Framework/Data/ReservationData.cs +++ b/OpenSim/Framework/Data/ReservationData.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - using libsecondlife; namespace OpenSim.Framework.Data diff --git a/OpenSim/Framework/Data/SimProfileData.cs b/OpenSim/Framework/Data/SimProfileData.cs index 201aa01..3dddfb4 100644 --- a/OpenSim/Framework/Data/SimProfileData.cs +++ b/OpenSim/Framework/Data/SimProfileData.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; +using libsecondlife; namespace OpenSim.Framework.Data { @@ -49,7 +47,7 @@ namespace OpenSim.Framework.Data /// /// OGS/OpenSim Specific ID for a region /// - public libsecondlife.LLUUID UUID; + public LLUUID UUID; /// /// Coordinates of the region @@ -109,6 +107,6 @@ namespace OpenSim.Framework.Data /// /// Region Map Texture Asset /// - public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006"); + public LLUUID regionMapTextureID = new LLUUID("00000000-0000-0000-9999-000000000006"); } } diff --git a/OpenSim/Framework/Data/UserData.cs b/OpenSim/Framework/Data/UserData.cs index 2e15b47..c65f9fd 100644 --- a/OpenSim/Framework/Data/UserData.cs +++ b/OpenSim/Framework/Data/UserData.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Data diff --git a/OpenSim/Framework/Data/UserProfileData.cs b/OpenSim/Framework/Data/UserProfileData.cs index ac168e0..bb7d48c 100644 --- a/OpenSim/Framework/Data/UserProfileData.cs +++ b/OpenSim/Framework/Data/UserProfileData.cs @@ -26,8 +26,6 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Data diff --git a/OpenSim/Framework/General/AgentInventory.cs b/OpenSim/Framework/General/AgentInventory.cs index fbf4d23..e45a0cd 100644 --- a/OpenSim/Framework/General/AgentInventory.cs +++ b/OpenSim/Framework/General/AgentInventory.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Types; diff --git a/OpenSim/Framework/General/AuthenticateSessionBase.cs b/OpenSim/Framework/General/AuthenticateSessionBase.cs index 73dd3e2..71616e3 100644 --- a/OpenSim/Framework/General/AuthenticateSessionBase.cs +++ b/OpenSim/Framework/General/AuthenticateSessionBase.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; using libsecondlife; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; diff --git a/OpenSim/Framework/General/BlockingQueue.cs b/OpenSim/Framework/General/BlockingQueue.cs index 667b8d8..0cc8124 100644 --- a/OpenSim/Framework/General/BlockingQueue.cs +++ b/OpenSim/Framework/General/BlockingQueue.cs @@ -25,10 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Threading; using System.Collections.Generic; -using System.Text; +using System.Threading; namespace OpenSim.Framework.Utilities { diff --git a/OpenSim/Framework/General/IRegionCommsListener.cs b/OpenSim/Framework/General/IRegionCommsListener.cs index 0e80941..32444f9 100644 --- a/OpenSim/Framework/General/IRegionCommsListener.cs +++ b/OpenSim/Framework/General/IRegionCommsListener.cs @@ -25,9 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; +using libsecondlife; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; @@ -35,7 +34,7 @@ namespace OpenSim.Framework { public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent); public delegate void UpdateNeighbours(List neighbours); - public delegate void AgentCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position); + public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position); public interface IRegionCommsListener { diff --git a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs index 462e2c5..508485b 100644 --- a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs +++ b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs @@ -25,14 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Net; -using System.Net.Sockets; -using System.IO; -using libsecondlife; -using OpenSim; using OpenSim.Framework.Types; namespace OpenSim.Framework.Interfaces diff --git a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs index 13980fe..2c379dd 100644 --- a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs +++ b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Framework.Interfaces { public interface IGenericConfig diff --git a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs index 0fafe1a..81dc293 100644 --- a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs +++ b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs @@ -26,10 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.IO; -using libsecondlife; //using OpenSim.world; namespace OpenSim.Framework.Interfaces diff --git a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs index 2f4b340..ae6cedb 100644 --- a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs +++ b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs @@ -26,10 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.IO; -using libsecondlife; //using OpenSim.world; namespace OpenSim.Framework.Interfaces diff --git a/OpenSim/Framework/General/Interfaces/IAssetServer.cs b/OpenSim/Framework/General/Interfaces/IAssetServer.cs index 826392d..ab60dd7 100644 --- a/OpenSim/Framework/General/Interfaces/IAssetServer.cs +++ b/OpenSim/Framework/General/Interfaces/IAssetServer.cs @@ -25,11 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Net; -using System.Net.Sockets; -using System.IO; -using System.Threading; using libsecondlife; using OpenSim.Framework.Types; diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index d62247c..b5a0a0b 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs @@ -25,14 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Inventory; +using System.Net; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Types; -using System.Net; namespace OpenSim.Framework.Interfaces { diff --git a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs index 4987d10..dbdb25d 100644 --- a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs +++ b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs @@ -26,7 +26,6 @@ * */ -using System; using libsecondlife; using OpenSim.Framework.Types; diff --git a/OpenSim/Framework/General/Interfaces/IUserServer.cs b/OpenSim/Framework/General/Interfaces/IUserServer.cs index c6e2223..b3700d2 100644 --- a/OpenSim/Framework/General/Interfaces/IUserServer.cs +++ b/OpenSim/Framework/General/Interfaces/IUserServer.cs @@ -25,11 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Inventory; using libsecondlife; +using OpenSim.Framework.Inventory; namespace OpenSim.Framework.Interfaces { diff --git a/OpenSim/Framework/General/Interfaces/IWorld.cs b/OpenSim/Framework/General/Interfaces/IWorld.cs index 2edc0b4..204c01b 100644 --- a/OpenSim/Framework/General/Interfaces/IWorld.cs +++ b/OpenSim/Framework/General/Interfaces/IWorld.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; using OpenSim.Framework.Types; diff --git a/OpenSim/Framework/General/LoginService.cs b/OpenSim/Framework/General/LoginService.cs index f14754f..02efcec 100644 --- a/OpenSim/Framework/General/LoginService.cs +++ b/OpenSim/Framework/General/LoginService.cs @@ -25,13 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using Nwc.XmlRpc; -using libsecondlife; - namespace OpenSim.Framework.Grid { public abstract class LoginService diff --git a/OpenSim/Framework/General/Properties/AssemblyInfo.cs b/OpenSim/Framework/General/Properties/AssemblyInfo.cs index 86f5cdb..004040b 100644 --- a/OpenSim/Framework/General/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/General/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/General/RegionCommsListener.cs b/OpenSim/Framework/General/RegionCommsListener.cs index 5fa2f58..2b0bc62 100644 --- a/OpenSim/Framework/General/RegionCommsListener.cs +++ b/OpenSim/Framework/General/RegionCommsListener.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; +using libsecondlife; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; @@ -57,7 +55,7 @@ namespace OpenSim.Framework return false; } - public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) { if (OnAvatarCrossingIntoRegion != null) { diff --git a/OpenSim/Framework/General/Remoting.cs b/OpenSim/Framework/General/Remoting.cs index e6fdf70..df32db2 100644 --- a/OpenSim/Framework/General/Remoting.cs +++ b/OpenSim/Framework/General/Remoting.cs @@ -26,9 +26,8 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using System.Security.Cryptography; +using System.Text; namespace OpenSim.Framework { diff --git a/OpenSim/Framework/General/SimProfile.cs b/OpenSim/Framework/General/SimProfile.cs index cfa5e50..47f1af3 100644 --- a/OpenSim/Framework/General/SimProfile.cs +++ b/OpenSim/Framework/General/SimProfile.cs @@ -26,10 +26,7 @@ * */ using System; -using System.Collections.Generic; using System.Collections; -using System.Xml; -using System.Text; using libsecondlife; using Nwc.XmlRpc; diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs index a650343..00e9d0a 100644 --- a/OpenSim/Framework/General/Types/AgentCiruitData.cs +++ b/OpenSim/Framework/General/Types/AgentCiruitData.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs index 4c93da7..6152b7d 100644 --- a/OpenSim/Framework/General/Types/AgentWearable.cs +++ b/OpenSim/Framework/General/Types/AgentWearable.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs index 86586a6..c203f51 100644 --- a/OpenSim/Framework/General/Types/AssetBase.cs +++ b/OpenSim/Framework/General/Types/AssetBase.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs index 8a10b70..8aa872e 100644 --- a/OpenSim/Framework/General/Types/AssetLandmark.cs +++ b/OpenSim/Framework/General/Types/AssetLandmark.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; using System.Text; using libsecondlife; @@ -51,7 +49,7 @@ namespace OpenSim.Framework.Types private void InternData() { - string temp = System.Text.Encoding.UTF8.GetString(Data).Trim(); + string temp = Encoding.UTF8.GetString(Data).Trim(); string[] parts = temp.Split('\n'); int.TryParse(parts[0].Substring(17, 1), out Version); LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); diff --git a/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs index 8cac23a..3681336 100644 --- a/OpenSim/Framework/General/Types/AssetStorage.cs +++ b/OpenSim/Framework/General/Types/AssetStorage.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs index 778c893..436b109 100644 --- a/OpenSim/Framework/General/Types/EstateSettings.cs +++ b/OpenSim/Framework/General/Types/EstateSettings.cs @@ -26,10 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; - using libsecondlife; namespace OpenSim.Framework.Types @@ -46,8 +42,8 @@ namespace OpenSim.Framework.Types public int redirectGridX = 0; //?? public int redirectGridY = 0; //?? - public libsecondlife.Simulator.RegionFlags regionFlags = libsecondlife.Simulator.RegionFlags.None; //Booleam values of various region settings - public libsecondlife.Simulator.SimAccess simAccess = libsecondlife.Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. + public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings + public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. public float sunHour = 0; public float terrainRaiseLimit = 0; diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs index 3180a16..d54c019 100644 --- a/OpenSim/Framework/General/Types/Login.cs +++ b/OpenSim/Framework/General/Types/Login.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs index 2e6f56e..fbb3b73 100644 --- a/OpenSim/Framework/General/Types/MapBlockData.cs +++ b/OpenSim/Framework/General/Types/MapBlockData.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs index 310fd1c..bb67981 100644 --- a/OpenSim/Framework/General/Types/NeighbourInfo.cs +++ b/OpenSim/Framework/General/Types/NeighbourInfo.cs @@ -25,14 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using libsecondlife; - namespace OpenSim.Framework.Types { public class NeighbourInfo diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs index c6b81a7..89ebf94 100644 --- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs +++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs @@ -26,8 +26,7 @@ * */ using System; -using System.Collections.Generic; -using System.Text; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; namespace OpenSim.Framework.Types @@ -63,7 +62,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("HttpListenerPort"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); + string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); configData.SetAttribute("HttpListenerPort", location); this.HttpListenerPort = Convert.ToInt32(location); } @@ -76,7 +75,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("RemotingListenerPort"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); + string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); configData.SetAttribute("RemotingListenerPort", location); this.RemotingListenerPort = Convert.ToInt32(location); } @@ -92,7 +91,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("DefaultLocationX"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); + string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); configData.SetAttribute("DefaultLocationX", location); this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); } @@ -106,7 +105,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("DefaultLocationY"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); + string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); configData.SetAttribute("DefaultLocationY", location); this.DefaultHomeLocY = (uint)Convert.ToUInt32(location); } @@ -122,7 +121,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("GridServerURL"); if (attri == "") { - this.GridURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); + this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); configData.SetAttribute("GridServerURL", this.GridURL); } else @@ -135,7 +134,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("GridSendKey"); if (attri == "") { - this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); + this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); configData.SetAttribute("GridSendKey", this.GridSendKey); } else @@ -148,7 +147,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("GridRecvKey"); if (attri == "") { - this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); + this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); configData.SetAttribute("GridRecvKey", this.GridRecvKey); } else @@ -161,7 +160,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("UserServerURL"); if (attri == "") { - this.UserURL= OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); + this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); configData.SetAttribute("UserServerURL", this.UserURL); } else @@ -174,7 +173,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("UserSendKey"); if (attri == "") { - this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server", "null"); + this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null"); configData.SetAttribute("UserSendKey", this.UserSendKey); } else @@ -187,7 +186,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("UserRecvKey"); if (attri == "") { - this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); + this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); configData.SetAttribute("GridRecvKey", this.UserRecvKey); } else @@ -199,7 +198,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("AssetServerURL"); if (attri == "") { - this.AssetURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); + this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); configData.SetAttribute("AssetServerURL", this.GridURL); } else @@ -212,8 +211,8 @@ namespace OpenSim.Framework.Types } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } } } diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs index 40f128a..761d55e 100644 --- a/OpenSim/Framework/General/Types/ParcelData.cs +++ b/OpenSim/Framework/General/Types/ParcelData.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types @@ -45,14 +42,14 @@ namespace OpenSim.Framework.Types public int area = 0; public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID - public libsecondlife.Parcel.ParcelCategory category = new libsecondlife.Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category + public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category public int claimDate = 0; //Unemplemented public int claimPrice = 0; //Unemplemented public LLUUID groupID = new LLUUID(); //Unemplemented public int groupPrims = 0; //Unemplemented public int salePrice = 0; //Unemeplemented. Parcels price. - public libsecondlife.Parcel.ParcelStatus parcelStatus = libsecondlife.Parcel.ParcelStatus.None; - public libsecondlife.Parcel.ParcelFlags parcelFlags = libsecondlife.Parcel.ParcelFlags.None; + public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.None; + public Parcel.ParcelFlags parcelFlags = Parcel.ParcelFlags.None; public byte landingType = 0; public byte mediaAutoScale = 0; public LLUUID mediaID = LLUUID.Zero; diff --git a/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs index f84ae3e..ff81bcd 100644 --- a/OpenSim/Framework/General/Types/PrimData.cs +++ b/OpenSim/Framework/General/Types/PrimData.cs @@ -26,8 +26,6 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index 584bc9b..1357e06 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Framework.Interfaces; namespace OpenSim.Framework.Types { diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs index 1271d04..409b05a 100644 --- a/OpenSim/Framework/General/Types/RegionHandle.cs +++ b/OpenSim/Framework/General/Types/RegionHandle.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Net; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index 7b99d06..4602dcf 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs @@ -26,14 +26,13 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using System.Globalization; +using System.Net; +using System.Net.Sockets; +using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using libsecondlife; -using System.Net; namespace OpenSim.Framework.Types { @@ -65,7 +64,7 @@ namespace OpenSim.Framework.Types if (ia == null) ia = Adr; - if (Adr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) + if (Adr.AddressFamily == AddressFamily.InterNetwork) { ia = Adr; break; @@ -170,7 +169,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("SimLocationX"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid Location X", "1000"); + string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000"); configData.SetAttribute("SimLocationX", location); m_regionLocX = (uint)Convert.ToUInt32(location); } @@ -183,7 +182,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("SimLocationY"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); + string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); configData.SetAttribute("SimLocationY", location); m_regionLocY = (uint)Convert.ToUInt32(location); } @@ -209,7 +208,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("TerrainMultiplier"); if (attri == "") { - string re = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); + string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture); configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString()); } @@ -222,7 +221,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("MasterAvatarFirstName"); if (attri == "") { - this.MasterAvatarFirstName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); + this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); } @@ -235,7 +234,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("MasterAvatarLastName"); if (attri == "") { - this.MasterAvatarLastName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); + this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); } @@ -250,7 +249,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("MasterAvatarSandboxPassword"); if (attri == "") { - this.MasterAvatarSandboxPassword = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); + this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); //Should I store this? configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); @@ -265,17 +264,17 @@ namespace OpenSim.Framework.Types } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } - OpenSim.Framework.Console.MainLog.Instance.Verbose("Sim settings loaded:"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Name: " + this.RegionName); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); + MainLog.Instance.Verbose("Sim settings loaded:"); + MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); + MainLog.Instance.Verbose("Name: " + this.RegionName); + MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); + MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); + MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); + MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); } diff --git a/OpenSim/Framework/General/Types/UUID.cs b/OpenSim/Framework/General/Types/UUID.cs index bb9206f..9cde18e 100644 --- a/OpenSim/Framework/General/Types/UUID.cs +++ b/OpenSim/Framework/General/Types/UUID.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/UserProfile.cs b/OpenSim/Framework/General/UserProfile.cs index 263dba2..243208a 100644 --- a/OpenSim/Framework/General/UserProfile.cs +++ b/OpenSim/Framework/General/UserProfile.cs @@ -25,12 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; +using System.Security.Cryptography; using libsecondlife; using OpenSim.Framework.Inventory; -using System.Security.Cryptography; namespace OpenSim.Framework.User { diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs index 8c34c9b..13e3af2 100644 --- a/OpenSim/Framework/General/Util.cs +++ b/OpenSim/Framework/General/Util.cs @@ -27,10 +27,8 @@ */ using System; using System.Security.Cryptography; -using System.Collections.Generic; using System.Text; using libsecondlife; -using libsecondlife.Packets; namespace OpenSim.Framework.Utilities { diff --git a/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs b/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs index de5f48d..fcffd67 100644 --- a/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs b/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs index c526aec..7fa085d 100644 --- a/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs +++ b/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs @@ -26,8 +26,7 @@ * */ using System; -using System.Collections.Generic; -using System.Text; +using System.IO; using System.Xml; using OpenSim.Framework.Interfaces; @@ -50,7 +49,7 @@ namespace OpenSim.GenericConfig { doc = new XmlDocument(); - if (System.IO.File.Exists(fileName)) + if (File.Exists(fileName)) { XmlTextReader reader = new XmlTextReader(fileName); reader.WhitespaceHandling = WhitespaceHandling.None; diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 5dc1f56..713793c 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -26,13 +26,14 @@ * */ using System; +using System.Collections; using System.Collections.Generic; +using System.IO; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading; using Nwc.XmlRpc; -using System.Collections; using OpenSim.Framework.Console; namespace OpenSim.Framework.Servers @@ -199,9 +200,9 @@ namespace OpenSim.Framework.Servers response.KeepAlive = false; response.SendChunked = false; - System.IO.Stream body = request.InputStream; - System.Text.Encoding encoding = System.Text.Encoding.UTF8; - System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); + Stream body = request.InputStream; + Encoding encoding = Encoding.UTF8; + StreamReader reader = new StreamReader(body, encoding); string requestBody = reader.ReadToEnd(); body.Close(); @@ -245,8 +246,8 @@ namespace OpenSim.Framework.Servers } - byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); - System.IO.Stream output = response.OutputStream; + byte[] buffer = Encoding.UTF8.GetBytes(responseString); + Stream output = response.OutputStream; response.SendChunked = false; response.ContentLength64 = buffer.Length; output.Write(buffer, 0, buffer.Length); @@ -260,7 +261,7 @@ namespace OpenSim.Framework.Servers public void Start() { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server"); + MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server"); m_workerThread = new Thread(new ThreadStart(StartHTTP)); m_workerThread.IsBackground = true; @@ -271,7 +272,7 @@ namespace OpenSim.Framework.Servers { try { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); + MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); m_httpListener = new HttpListener(); m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); @@ -286,7 +287,7 @@ namespace OpenSim.Framework.Servers } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message); + MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message); } } diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs index 6aeb58c..104de94 100644 --- a/OpenSim/Framework/Servers/CheckSumServer.cs +++ b/OpenSim/Framework/Servers/CheckSumServer.cs @@ -25,21 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Text; -using System.IO; -using System.Threading; -using System.Net; -using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Framework.Console; - - namespace OpenSim.Framework.Servers { /* public class CheckSumServer : UDPServerBase diff --git a/OpenSim/Framework/Servers/ILlsdMethodHandler.cs b/OpenSim/Framework/Servers/ILlsdMethodHandler.cs index f5daa8d..5382f2d 100644 --- a/OpenSim/Framework/Servers/ILlsdMethodHandler.cs +++ b/OpenSim/Framework/Servers/ILlsdMethodHandler.cs @@ -1,6 +1,30 @@ -using System; -using System.Collections.Generic; -using System.Text; +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ namespace OpenSim.Framework.Servers { diff --git a/OpenSim/Framework/Servers/LlsdMethod.cs b/OpenSim/Framework/Servers/LlsdMethod.cs index bf58a71..d17fa38 100644 --- a/OpenSim/Framework/Servers/LlsdMethod.cs +++ b/OpenSim/Framework/Servers/LlsdMethod.cs @@ -1,6 +1,30 @@ -using System; -using System.Collections.Generic; -using System.Text; +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ namespace OpenSim.Framework.Servers { diff --git a/OpenSim/Framework/Servers/RestMethod.cs b/OpenSim/Framework/Servers/RestMethod.cs index a2b6bf0..c6cb230 100644 --- a/OpenSim/Framework/Servers/RestMethod.cs +++ b/OpenSim/Framework/Servers/RestMethod.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Framework.Servers { public delegate string RestMethod( string request, string path, string param ); diff --git a/OpenSim/Framework/Servers/UDPServerBase.cs b/OpenSim/Framework/Servers/UDPServerBase.cs index 2617c56..508eb9d 100644 --- a/OpenSim/Framework/Servers/UDPServerBase.cs +++ b/OpenSim/Framework/Servers/UDPServerBase.cs @@ -26,16 +26,8 @@ * */ using System; -using System.Text; -using System.IO; -using System.Threading; using System.Net; using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using libsecondlife; using libsecondlife.Packets; namespace OpenSim.Framework.Servers diff --git a/OpenSim/Framework/Servers/XmlRpcMethod.cs b/OpenSim/Framework/Servers/XmlRpcMethod.cs index 51b3303..b76ac51 100644 --- a/OpenSim/Framework/Servers/XmlRpcMethod.cs +++ b/OpenSim/Framework/Servers/XmlRpcMethod.cs @@ -25,7 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using Nwc.XmlRpc; namespace OpenSim.Framework.Servers 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() + ")"); } } } diff --git a/OpenSim/Grid/AssetServer/AssetHttpServer.cs b/OpenSim/Grid/AssetServer/AssetHttpServer.cs index 31cb379..9546891 100644 --- a/OpenSim/Grid/AssetServer/AssetHttpServer.cs +++ b/OpenSim/Grid/AssetServer/AssetHttpServer.cs @@ -26,15 +26,10 @@ * */ using System; -using System.Collections.Generic; +using System.IO; using System.Net; using System.Text; using System.Text.RegularExpressions; -using System.Threading; -//using OpenSim.CAPS; -using Nwc.XmlRpc; -using System.Collections; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; namespace OpenSim.Grid.AssetServer @@ -69,9 +64,9 @@ namespace OpenSim.Grid.AssetServer response.KeepAlive = false; response.SendChunked = false; - System.IO.Stream body = request.InputStream; - System.Text.Encoding encoding = System.Text.Encoding.UTF8; - System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); + Stream body = request.InputStream; + Encoding encoding = Encoding.UTF8; + StreamReader reader = new StreamReader(body, encoding); string requestBody = reader.ReadToEnd(); body.Close(); @@ -114,7 +109,7 @@ namespace OpenSim.Grid.AssetServer Encoding Windows1252Encoding = Encoding.GetEncoding(1252); byte[] buffer = Windows1252Encoding.GetBytes(responseString); - System.IO.Stream output = response.OutputStream; + Stream output = response.OutputStream; response.SendChunked = false; response.ContentLength64 = buffer.Length; output.Write(buffer, 0, buffer.Length); diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index d06998d..112d72f 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -29,20 +29,10 @@ using System; using System.IO; using System.Text; -using System.Timers; -using System.Net; -using System.Reflection; -using System.Threading; +using Db4objects.Db4o; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Sims; using OpenSim.Framework.Console; using OpenSim.Framework.Types; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Servers; -using Db4objects.Db4o; -using Db4objects.Db4o.Query; namespace OpenSim.Grid.AssetServer { @@ -81,7 +71,7 @@ namespace OpenSim.Grid.AssetServer private OpenAsset_Main() { m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false); - OpenSim.Framework.Console.MainLog.Instance = m_console; + MainLog.Instance = m_console; } public void Startup() @@ -161,17 +151,17 @@ namespace OpenSim.Grid.AssetServer public void setupDB() { - bool yapfile = System.IO.File.Exists("assets.yap"); + bool yapfile = File.Exists("assets.yap"); try { db = Db4oFactory.OpenFile("assets.yap"); - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Main.cs:setupDB() - creation"); + MainLog.Instance.Verbose( "Main.cs:setupDB() - creation"); } catch (Exception e) { db.Close(); - OpenSim.Framework.Console.MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } if (!yapfile) { @@ -273,7 +263,7 @@ namespace OpenSim.Grid.AssetServer { - string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; + string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; string fileName = Path.Combine(dataPath, filename); FileInfo fInfo = new FileInfo(fileName); long numBytes = fInfo.Length; diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs index f9a18a8..dc39ce2 100644 --- a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs b/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs index 3f5d7dd..6c916a2 100644 --- a/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs +++ b/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs @@ -25,12 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Framework.Servers; using System.Collections; -using System.Collections.Generic; using libsecondlife; +using Nwc.XmlRpc; +using OpenSim.Framework.Servers; namespace OpenSim.Framework.Manager { diff --git a/OpenSim/Grid/Framework.Manager/GridServerManager.cs b/OpenSim/Grid/Framework.Manager/GridServerManager.cs index d5eaf6f..67cd35d 100644 --- a/OpenSim/Grid/Framework.Manager/GridServerManager.cs +++ b/OpenSim/Grid/Framework.Manager/GridServerManager.cs @@ -28,10 +28,9 @@ using System; using System.Collections; -using System.Collections.Generic; -using Nwc.XmlRpc; using System.Threading; using libsecondlife; +using Nwc.XmlRpc; namespace OpenSim.Framework.Manager { diff --git a/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs b/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs index c9701d6..39c9e8f 100644 --- a/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs +++ b/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs index 2218004..4acf81d 100644 --- a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs +++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs @@ -26,10 +26,9 @@ * */ using System; -using System.Collections.Generic; +using Db4objects.Db4o; using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; -using Db4objects.Db4o; namespace OpenGrid.Config.GridConfigDb4o { @@ -44,7 +43,7 @@ namespace OpenGrid.Config.GridConfigDb4o /// A grid configuration object public GridConfig GetConfigObject() { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll"); + MainLog.Instance.Verbose("Loading Db40Config dll"); return ( new DbGridConfig()); } } @@ -63,24 +62,24 @@ namespace OpenGrid.Config.GridConfigDb4o /// User configuration for the Grid Config interfaces /// public void LoadDefaults() { - OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); + MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); // About the grid options - this.GridOwner = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); + this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); // Asset Options - this.DefaultAssetServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); - this.AssetSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to asset server","null"); - this.AssetRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); + this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); + this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); + this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); // User Server Options - this.DefaultUserServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); - this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server","null"); - this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server","null"); + this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); + this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); + this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); // Region Server Options - this.SimSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to sims","null"); - this.SimRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from sims","null"); + this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); + this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); } /// @@ -95,7 +94,7 @@ namespace OpenGrid.Config.GridConfigDb4o IObjectSet result = db.Get(typeof(DbGridConfig)); // Found? if(result.Count==1) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); + MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); foreach (DbGridConfig cfg in result) { // Import each setting into this class // Grid Settings @@ -114,40 +113,40 @@ namespace OpenGrid.Config.GridConfigDb4o } // Create a new configuration object from this class } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); + MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); // Load default settings into this class LoadDefaults(); // Saves to the database file... - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Writing out default settings to local database"); + MainLog.Instance.Verbose( "Writing out default settings to local database"); db.Set(this); // Closes file locks db.Close(); } } catch(Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } // Grid Settings - OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid settings loaded:"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); + MainLog.Instance.Verbose("Grid settings loaded:"); + MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); // Asset Settings - OpenSim.Framework.Console.MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); + MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); + MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); + MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); // User Settings - OpenSim.Framework.Console.MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); + MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); + MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); + MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); // Region Settings - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); + MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); + MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); } /// diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index e562721..7986591 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -28,15 +28,14 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Text; using System.Reflection; -using OpenSim.Framework.Data; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using OpenSim.Framework.Sims; +using System.Xml; using libsecondlife; using Nwc.XmlRpc; -using System.Xml; +using OpenSim.Framework.Console; +using OpenSim.Framework.Data; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Utilities; namespace OpenSim.Grid.GridServer { @@ -45,7 +44,7 @@ namespace OpenSim.Grid.GridServer Dictionary _plugins = new Dictionary(); Dictionary _logplugins = new Dictionary(); - public OpenSim.Framework.Interfaces.GridConfig config; + public GridConfig config; /// /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. @@ -53,10 +52,10 @@ namespace OpenSim.Grid.GridServer /// The filename to the grid server plugin DLL public void AddPlugin(string FileName) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Attempting to load " + FileName); + MainLog.Instance.Verbose("Storage: Attempting to load " + FileName); Assembly pluginAssembly = Assembly.LoadFrom(FileName); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); + MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); foreach (Type pluginType in pluginAssembly.GetTypes()) { if (!pluginType.IsAbstract) @@ -69,7 +68,7 @@ namespace OpenSim.Grid.GridServer IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); plug.Initialise(); this._plugins.Add(plug.getName(), plug); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Added IGridData Interface"); + MainLog.Instance.Verbose("Storage: Added IGridData Interface"); } typeInterface = null; @@ -82,7 +81,7 @@ namespace OpenSim.Grid.GridServer ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); plug.Initialise(); this._logplugins.Add(plug.getName(), plug); - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Storage: Added ILogData Interface"); + MainLog.Instance.Verbose( "Storage: Added ILogData Interface"); } typeInterface = null; @@ -110,7 +109,7 @@ namespace OpenSim.Grid.GridServer } catch (Exception) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); + MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); } } } @@ -120,7 +119,7 @@ namespace OpenSim.Grid.GridServer /// /// A UUID key of the region to return /// A SimProfileData for the region - public SimProfileData getRegion(libsecondlife.LLUUID uuid) + public SimProfileData getRegion(LLUUID uuid) { foreach(KeyValuePair kvp in _plugins) { try @@ -129,7 +128,7 @@ namespace OpenSim.Grid.GridServer } catch (Exception) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key); + MainLog.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key); } } return null; @@ -150,7 +149,7 @@ namespace OpenSim.Grid.GridServer } catch { - OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); + MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); } } return null; @@ -174,7 +173,7 @@ namespace OpenSim.Grid.GridServer } catch { - OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); + MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); } } @@ -370,7 +369,7 @@ namespace OpenSim.Grid.GridServer simProfileList.Add(simProfileBlock); } - OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode"); + MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode"); } else { @@ -403,7 +402,7 @@ namespace OpenSim.Grid.GridServer } } } - OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode"); + MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode"); } responseData["sim-profiles"] = simProfileList; @@ -565,7 +564,7 @@ namespace OpenSim.Grid.GridServer try { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); + MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); foreach (KeyValuePair kvp in _plugins) { try @@ -575,7 +574,7 @@ namespace OpenSim.Grid.GridServer if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null)) { kvp.Value.AddProfile(TheSim); - OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); + MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); } else @@ -585,7 +584,7 @@ namespace OpenSim.Grid.GridServer } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString()); + MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString()); } } return "OK"; diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index 490f757..20c4905 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs @@ -27,20 +27,14 @@ */ using System; -using System.IO; -using System.Text; -using System.Timers; -using System.Net; -using System.Threading; using System.Reflection; -using libsecondlife; -using OpenSim.Framework.Manager; -using OpenSim.Framework; -using OpenSim.Framework.Sims; +using System.Threading; +using System.Timers; using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; using OpenSim.GenericConfig; +using Timer=System.Timers.Timer; namespace OpenSim.Grid.GridServer { @@ -156,7 +150,7 @@ namespace OpenSim.Grid.GridServer m_console.Verbose( "Main.cs:Startup() - Starting sim status checker"); - System.Timers.Timer simCheckTimer = new System.Timers.Timer(3600000 * 3); // 3 Hours between updates. + Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates. simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); simCheckTimer.Enabled = true; } diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs index 303dddf..62a68a8 100644 --- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs index 25e0211..15298e8 100644 --- a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs +++ b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index 770a6b9..c7f8255 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs @@ -26,10 +26,9 @@ * */ using System; -using System.Collections.Generic; +using Db4objects.Db4o; using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; -using Db4objects.Db4o; namespace OpenUser.Config.UserConfigDb4o { @@ -37,7 +36,7 @@ namespace OpenUser.Config.UserConfigDb4o { public UserConfig GetConfigObject() { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll"); + MainLog.Instance.Verbose("Loading Db40Config dll"); return ( new DbUserConfig()); } } @@ -47,13 +46,13 @@ namespace OpenUser.Config.UserConfigDb4o private IObjectContainer db; public void LoadDefaults() { - OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); + MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); - this.DefaultStartupMsg = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); + this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); - this.GridServerURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); - this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server","null"); - this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); + this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); + this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); + this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); } public override void InitConfig() { @@ -61,7 +60,7 @@ namespace OpenUser.Config.UserConfigDb4o db = Db4oFactory.OpenFile("openuser.yap"); IObjectSet result = db.Get(typeof(DbUserConfig)); if(result.Count==1) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); + MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); foreach (DbUserConfig cfg in result) { this.GridServerURL=cfg.GridServerURL; this.GridSendKey=cfg.GridSendKey; @@ -69,22 +68,22 @@ namespace OpenUser.Config.UserConfigDb4o this.DefaultStartupMsg=cfg.DefaultStartupMsg; } } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); + MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); LoadDefaults(); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Writing out default settings to local database"); + MainLog.Instance.Verbose("Writing out default settings to local database"); db.Set(this); db.Close(); } } catch(Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } - OpenSim.Framework.Console.MainLog.Instance.Verbose("User settings loaded:"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); + MainLog.Instance.Verbose("User settings loaded:"); + MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); + MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); + MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); + MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); } diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index c65bb97..5560e7d 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -27,18 +27,13 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.Reflection; -using System.IO; -using System.Text; using libsecondlife; -using OpenSim.Framework.User; -using OpenSim.Framework.Sims; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Interfaces; using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; +using OpenSim.Framework.User; using OpenSim.Framework.Utilities; using OpenSim.GenericConfig; @@ -73,7 +68,7 @@ namespace OpenSim.Grid.UserServer private OpenUser_Main() { m_console = new LogBase("opengrid-userserver-console.log", "OpenUser", this , false); - OpenSim.Framework.Console.MainLog.Instance = m_console; + MainLog.Instance = m_console; } private void Work() @@ -93,16 +88,16 @@ namespace OpenSim.Grid.UserServer this.ConfigDB(this.localXMLConfig); this.localXMLConfig.Close(); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration"); + MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration"); Cfg = this.LoadConfigDll(this.ConfigDll); Cfg.InitConfig(); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); + MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); m_userManager = new UserManager(); m_userManager._config = Cfg; m_userManager.AddPlugin(StorageDll); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); + MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); BaseHttpServer httpServer = new BaseHttpServer(8002); httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod); diff --git a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs index 5d5ce8d..a0a6f3c 100644 --- a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index a3e3322..4610a9d 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -27,22 +27,11 @@ */ 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 Nwc.XmlRpc; +using OpenSim.Framework.Data; using OpenSim.Framework.Sims; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Utilities; - using OpenSim.Framework.UserManagement; -using System.Security.Cryptography; - namespace OpenSim.Grid.UserServer { public class UserManager : UserManagerBase diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 1dcd99b..0428f5a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -26,10 +26,8 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using OpenSim.Framework.Console; -using OpenSim.Region.ClientStack; +using OpenSim.Region.Environment.Scenes; namespace OpenSim { @@ -109,13 +107,13 @@ namespace OpenSim sim.m_sandbox = sandBoxMode; sim.user_accounts = userAccounts; sim.gridLocalAsset = gridLocalAsset; - OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = allowFlying; + ScenePresence.PhysicsEngineFlying = allowFlying; sim.StartUp(); while (true) { - OpenSim.Framework.Console.MainLog.Instance.MainLogPrompt(); + MainLog.Instance.MainLogPrompt(); } } } diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 097d1cc..e976fe3 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -27,37 +27,23 @@ */ using System; -using System.Text; using System.IO; -using System.Threading; -using System.Net; -using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Region.Environment; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Terrain; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Data; - -using OpenSim.Framework.Types; -using OpenSim.Framework; using OpenSim.Assets; -using OpenSim.Region.Caches; +using OpenSim.Framework; +using OpenSim.Framework.Communications; using OpenSim.Framework.Console; -using OpenSim.Physics.Manager; -using Nwc.XmlRpc; +using OpenSim.Framework.Data; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; using OpenSim.GenericConfig; -using OpenSim.Framework.Communications; -using OpenSim.Region.Communications.OGS1; -using OpenSim.Region.Communications.Local; - +using OpenSim.Physics.Manager; +using OpenSim.Region.Caches; using OpenSim.Region.ClientStack; +using OpenSim.Region.Communications.Local; +using OpenSim.Region.Communications.OGS1; +using OpenSim.Region.Environment.Scenes; namespace OpenSim { @@ -96,7 +82,7 @@ namespace OpenSim } m_log = new LogBase(m_logFilename, "Region", this, m_silent); - OpenSim.Framework.Console.MainLog.Instance = m_log; + MainLog.Instance = m_log; m_log.Verbose( "Main.cs:Startup() - Loading configuration"); this.serversData.InitConfig(this.m_sandbox, this.localConfig); @@ -121,7 +107,7 @@ namespace OpenSim startuptime = DateTime.Now; - this.physManager = new OpenSim.Physics.Manager.PhysicsManager(); + this.physManager = new PhysicsManager(); this.physManager.LoadPlugins(); this.SetupHttpListener(); @@ -187,12 +173,12 @@ namespace OpenSim RegionInfo regionDat = new RegionInfo(); AuthenticateSessionsBase authenBase; - string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Regions"); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); string[] configFiles = Directory.GetFiles(path, "*.xml"); if (configFiles.Length == 0) { - string path2 = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Regions"); + string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); string path3 = Path.Combine(path2, "default.xml"); Console.WriteLine("Creating default region config file"); //TODO create default region @@ -361,23 +347,23 @@ namespace OpenSim case "": this.m_physicsEngine = "basicphysics"; configData.SetAttribute("PhysicsEngine", "basicphysics"); - OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false; + ScenePresence.PhysicsEngineFlying = false; break; case "basicphysics": this.m_physicsEngine = "basicphysics"; configData.SetAttribute("PhysicsEngine", "basicphysics"); - OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false; + ScenePresence.PhysicsEngineFlying = false; break; case "RealPhysX": this.m_physicsEngine = "RealPhysX"; - OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true; + ScenePresence.PhysicsEngineFlying = true; break; case "OpenDynamicsEngine": this.m_physicsEngine = "OpenDynamicsEngine"; - OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true; + ScenePresence.PhysicsEngineFlying = true; break; } @@ -459,7 +445,7 @@ namespace OpenSim m_log.Error( "That is " + (DateTime.Now - startuptime).ToString()); break; case "users": - OpenSim.Region.Environment.Scenes.ScenePresence TempAv; + ScenePresence TempAv; m_log.Error( String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) { diff --git a/OpenSim/Region/Application/VersionInfo.cs b/OpenSim/Region/Application/VersionInfo.cs index 5d1354e..2c720a3 100644 --- a/OpenSim/Region/Application/VersionInfo.cs +++ b/OpenSim/Region/Application/VersionInfo.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; - namespace OpenSim { /// diff --git a/OpenSim/Region/Caches/AssetCache.cs b/OpenSim/Region/Caches/AssetCache.cs index 6cf921b..453edbe 100644 --- a/OpenSim/Region/Caches/AssetCache.cs +++ b/OpenSim/Region/Caches/AssetCache.cs @@ -28,13 +28,12 @@ using System; using System.Collections.Generic; -using System.Threading; using System.Reflection; +using System.Threading; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using OpenSim.Framework.Utilities; namespace OpenSim.Region.Caches { @@ -45,8 +44,8 @@ namespace OpenSim.Region.Caches /// public class AssetCache : IAssetReceiver { - public Dictionary Assets; - public Dictionary Textures; + public Dictionary Assets; + public Dictionary Textures; public List AssetRequests = new List(); //assets ready to be sent to viewers public List TextureRequests = new List(); //textures ready to be sent @@ -67,8 +66,8 @@ namespace OpenSim.Region.Caches Console.WriteLine("Creating Asset cache"); _assetServer = assetServer; _assetServer.SetReceiver(this); - Assets = new Dictionary(); - Textures = new Dictionary(); + Assets = new Dictionary(); + Textures = new Dictionary(); this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); this._assetCacheThread.IsBackground = true; this._assetCacheThread.Start(); @@ -81,8 +80,8 @@ namespace OpenSim.Region.Caches _assetServer = this.LoadAssetDll(assetServerDLLName); _assetServer.SetServerInfo(assetServerURL, assetServerKey); _assetServer.SetReceiver(this); - Assets = new Dictionary(); - Textures = new Dictionary(); + Assets = new Dictionary(); + Textures = new Dictionary(); this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); this._assetCacheThread.IsBackground = true; this._assetCacheThread.Start(); @@ -216,7 +215,7 @@ namespace OpenSim.Region.Caches /// Event handler, called by a TextureSender object to say that texture has been sent /// /// - public void TextureSent(AssetCache.TextureSender sender) + public void TextureSent(TextureSender sender) { if (this.SendingTextures.ContainsKey(sender.request.ImageInfo.FullID)) { diff --git a/OpenSim/Region/Caches/Properties/AssemblyInfo.cs b/OpenSim/Region/Caches/Properties/AssemblyInfo.cs index 5e6ecbb..8389415 100644 --- a/OpenSim/Region/Caches/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Caches/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs index 2bbf656..b38979d 100644 --- a/OpenSim/Region/Capabilities/Caps.cs +++ b/OpenSim/Region/Capabilities/Caps.cs @@ -29,14 +29,11 @@ using System; using System.Collections; using System.Collections.Generic; using System.Text; -using System.IO; -using System.Xml; +using libsecondlife; using OpenSim.Framework.Servers; -using OpenSim.Framework; -using OpenSim.Framework.Utilities; using OpenSim.Framework.Types; +using OpenSim.Framework.Utilities; using OpenSim.Region.Caches; -using libsecondlife; namespace OpenSim.Region.Capabilities { @@ -126,7 +123,7 @@ namespace OpenSim.Region.Capabilities /// public string MapLayer(string request, string path, string param) { - Encoding _enc = System.Text.Encoding.UTF8; + Encoding _enc = Encoding.UTF8; Hashtable hash =(Hashtable) LLSD.LLSDDeserialize(_enc.GetBytes(request)); LLSDMapRequest mapReq = new LLSDMapRequest(); LLSDHelpers.DeserialiseLLSDMap(hash, mapReq ); @@ -252,7 +249,7 @@ namespace OpenSim.Region.Capabilities public string uploaderCaps(string request, string path, string param) { - Encoding _enc = System.Text.Encoding.UTF8; + Encoding _enc = Encoding.UTF8; byte[] data = _enc.GetBytes(request); //Console.WriteLine("recieved upload " + Util.FieldToString(data)); LLUUID inv = this.inventoryItemID; diff --git a/OpenSim/Region/Capabilities/LLSDArray.cs b/OpenSim/Region/Capabilities/LLSDArray.cs index 76d5a2c..e04849f 100644 --- a/OpenSim/Region/Capabilities/LLSDArray.cs +++ b/OpenSim/Region/Capabilities/LLSDArray.cs @@ -25,10 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections; -using System.Collections.Generic; -using System.Text; namespace OpenSim.Region.Capabilities { diff --git a/OpenSim/Region/Capabilities/LLSDCapEvent.cs b/OpenSim/Region/Capabilities/LLSDCapEvent.cs index d47d25c..51b4fe0 100644 --- a/OpenSim/Region/Capabilities/LLSDCapEvent.cs +++ b/OpenSim/Region/Capabilities/LLSDCapEvent.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs index d6db606..1522559 100644 --- a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs +++ b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/Capabilities/LLSDEmpty.cs b/OpenSim/Region/Capabilities/LLSDEmpty.cs index 68f1ce9..d79c09e 100644 --- a/OpenSim/Region/Capabilities/LLSDEmpty.cs +++ b/OpenSim/Region/Capabilities/LLSDEmpty.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/Capabilities/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs index 76d9345..19ef0c9 100644 --- a/OpenSim/Region/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs @@ -27,9 +27,8 @@ */ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.IO; +using System.Reflection; using System.Xml; using libsecondlife; @@ -43,7 +42,7 @@ namespace OpenSim.Region.Capabilities XmlTextWriter writer = new XmlTextWriter(sw); writer.Formatting = Formatting.None; writer.WriteStartElement(String.Empty, "llsd", String.Empty); - LLSDHelpers.SerializeLLSDType(writer, obj); + SerializeLLSDType(writer, obj); writer.WriteEndElement(); writer.Close(); return sw.ToString(); @@ -59,7 +58,7 @@ namespace OpenSim.Region.Capabilities { case "MAP": writer.WriteStartElement(String.Empty, "map", String.Empty); - System.Reflection.FieldInfo[] fields = myType.GetFields(); + FieldInfo[] fields = myType.GetFields(); for (int i = 0; i < fields.Length; i++) { object fieldValue = fields[i].GetValue(obj); @@ -115,7 +114,7 @@ namespace OpenSim.Region.Capabilities IDictionaryEnumerator enumerator = llsd.GetEnumerator(); while (enumerator.MoveNext()) { - System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key); + FieldInfo field = myType.GetField((string)enumerator.Key); if (field != null) { if (enumerator.Value is Hashtable) diff --git a/OpenSim/Region/Capabilities/LLSDMapLayer.cs b/OpenSim/Region/Capabilities/LLSDMapLayer.cs index b097ec3..566d0e9 100644 --- a/OpenSim/Region/Capabilities/LLSDMapLayer.cs +++ b/OpenSim/Region/Capabilities/LLSDMapLayer.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - using libsecondlife; namespace OpenSim.Region.Capabilities diff --git a/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs index ee37a5b..ce746ae 100644 --- a/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs +++ b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/Capabilities/LLSDMapRequest.cs b/OpenSim/Region/Capabilities/LLSDMapRequest.cs index b15f1be..fb739cd 100644 --- a/OpenSim/Region/Capabilities/LLSDMapRequest.cs +++ b/OpenSim/Region/Capabilities/LLSDMapRequest.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/Capabilities/LLSDTest.cs b/OpenSim/Region/Capabilities/LLSDTest.cs index 3948f2c..f23e327 100644 --- a/OpenSim/Region/Capabilities/LLSDTest.cs +++ b/OpenSim/Region/Capabilities/LLSDTest.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/Capabilities/LLSDType.cs b/OpenSim/Region/Capabilities/LLSDType.cs index a2ae8df..c58a937 100644 --- a/OpenSim/Region/Capabilities/LLSDType.cs +++ b/OpenSim/Region/Capabilities/LLSDType.cs @@ -26,8 +26,6 @@ * */ using System; -using System.Collections.Generic; -using System.Text; namespace OpenSim.Region.Capabilities { diff --git a/OpenSim/Region/Capabilities/LLSDUploadReply.cs b/OpenSim/Region/Capabilities/LLSDUploadReply.cs index 83cf166..023a056 100644 --- a/OpenSim/Region/Capabilities/LLSDUploadReply.cs +++ b/OpenSim/Region/Capabilities/LLSDUploadReply.cs @@ -25,11 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - using libsecondlife; + namespace OpenSim.Region.Capabilities { [LLSDType("MAP")] diff --git a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs index da74f85..082c0d0 100644 --- a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs +++ b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs @@ -28,13 +28,12 @@ using System; using System.Collections.Generic; +using System.Text; using libsecondlife; -using OpenSim; using libsecondlife.Packets; -//using OpenSim.GridServers; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Inventory; using OpenSim.Framework.Types; -using OpenSim.Framework.Interfaces; using OpenSim.Region.ClientStack; namespace OpenSim.Assets @@ -46,7 +45,7 @@ namespace OpenSim.Assets { private Dictionary _agentsInventory; private List _serverRequests; //list of requests made to user server. - private System.Text.Encoding _enc = System.Text.Encoding.ASCII; + private Encoding _enc = Encoding.ASCII; private const uint FULL_MASK_PERMISSIONS = 2147483647; public InventoryCache() @@ -127,7 +126,7 @@ namespace OpenSim.Assets return res; } - public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, OpenSim.Framework.Types.AssetBase asset) + public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, AssetBase asset) { LLUUID newItem = null; if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) @@ -163,7 +162,7 @@ namespace OpenSim.Assets return res; } - public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, OpenSim.Framework.Types.AssetBase asset) + public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, AssetBase asset) { if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) { @@ -238,7 +237,7 @@ namespace OpenSim.Assets Descend.ItemData[i].SalePrice = 100; Descend.ItemData[i].SaleType = 0; Descend.ItemData[i].Type = Item.Type; - Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); + Descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); } userInfo.OutPacket(Descend); @@ -286,7 +285,7 @@ namespace OpenSim.Assets InventoryReply.InventoryData[0].SalePrice = 100; InventoryReply.InventoryData[0].SaleType = 0; InventoryReply.InventoryData[0].Type = Item.Type; - InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); + InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); userInfo.OutPacket(InventoryReply); } } @@ -320,7 +319,7 @@ namespace OpenSim.Assets InventoryReply.InventoryData[0].SalePrice = 100; InventoryReply.InventoryData[0].SaleType = 0; InventoryReply.InventoryData[0].Type = Item.Type; - InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); + InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); remoteClient.OutPacket(InventoryReply); } diff --git a/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs index f99cf79..f4e537c 100644 --- a/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs +++ b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs @@ -25,13 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using System.Net; using System.Net.Sockets; -using libsecondlife; - namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 51f02da..40e0021 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs @@ -27,14 +27,14 @@ */ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Types; - +using Axiom.MathLib; using libsecondlife; using libsecondlife.Packets; -using System.Net; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; namespace OpenSim.Region.ClientStack { @@ -137,7 +137,7 @@ namespace OpenSim.Region.ClientStack /// public void SendRegionHandshake(RegionInfo regionInfo) { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; RegionHandshakePacket handshake = new RegionHandshakePacket(); handshake.RegionInfo.BillableFactor = regionInfo.estateSettings.billableFactor; @@ -219,8 +219,8 @@ namespace OpenSim.Region.ClientStack /// public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { - System.Text.Encoding enc = System.Text.Encoding.ASCII; - libsecondlife.Packets.ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket(); + Encoding enc = Encoding.ASCII; + ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket(); reply.ChatData.Audible = 1; reply.ChatData.Message = message; reply.ChatData.ChatType = type; @@ -260,7 +260,7 @@ namespace OpenSim.Region.ClientStack } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); } } @@ -286,7 +286,7 @@ namespace OpenSim.Region.ClientStack } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); } } @@ -298,7 +298,7 @@ namespace OpenSim.Region.ClientStack /// public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint ) { - System.Net.IPAddress neighbourIP = neighbourEndPoint.Address; + IPAddress neighbourIP = neighbourEndPoint.Address; ushort neighbourPort = (ushort) neighbourEndPoint.Port; EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket(); @@ -343,7 +343,7 @@ namespace OpenSim.Region.ClientStack newSimPack.Info = new CrossedRegionPacket.InfoBlock(); newSimPack.Info.Position = pos; newSimPack.Info.LookAt = look; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!! - newSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock(); + newSimPack.RegionData = new CrossedRegionPacket.RegionDataBlock(); newSimPack.RegionData.RegionHandle = newRegionHandle; byte[] byteIP = externalIPEndPoint.Address.GetAddressBytes(); newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24; @@ -359,7 +359,7 @@ namespace OpenSim.Region.ClientStack public void SendMapBlock(List mapBlocks) { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; MapBlockReplyPacket mapReply = new MapBlockReplyPacket(); mapReply.AgentData.AgentID = this.AgentID; @@ -514,20 +514,20 @@ namespace OpenSim.Region.ClientStack /// public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; //send a objectupdate packet with information about the clients avatar ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); objupdate.RegionData.RegionHandle = regionHandle; objupdate.RegionData.TimeDilation = 64096; - objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; + objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry); //give this avatar object a local id and assign the user a name objupdate.ObjectData[0].ID = avatarLocalID; objupdate.ObjectData[0].FullID = avatarID; objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName + " \0"); - libsecondlife.LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); + LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); byte[] pb = pos2.GetBytes(); Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); @@ -716,9 +716,9 @@ namespace OpenSim.Region.ClientStack ushort InternVelocityX; ushort InternVelocityY; ushort InternVelocityZ; - Axiom.MathLib.Vector3 internDirec = new Axiom.MathLib.Vector3(0, 0, 0); + Vector3 internDirec = new Vector3(0, 0, 0); - internDirec = new Axiom.MathLib.Vector3(velocity.X, velocity.Y, velocity.Z); + internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z); internDirec = internDirec / 128.0f; internDirec.x += 1; @@ -961,7 +961,7 @@ namespace OpenSim.Region.ClientStack /// protected ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) { - libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); + ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); SetDefaultAvatarPacketValues(ref objdata); objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); @@ -977,12 +977,12 @@ namespace OpenSim.Region.ClientStack { objdata.TextureEntry = textureEntry; } - System.Text.Encoding enc = System.Text.Encoding.ASCII; - libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16); + Encoding enc = Encoding.ASCII; + LLVector3 pos = new LLVector3(objdata.ObjectData, 16); pos.X = 100f; objdata.ID = 8880000; objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0"); - libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100f, 23f); + LLVector3 pos2 = new LLVector3(100f, 100f, 23f); //objdata.FullID=user.AgentID; byte[] pb = pos.GetBytes(); Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); diff --git a/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs index bc6cc21..60cd33a 100644 --- a/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs +++ b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs @@ -27,14 +27,13 @@ */ using System; using System.Collections.Generic; -using System.Text; +using libsecondlife; +using libsecondlife.Packets; using OpenSim.Assets; -using OpenSim.Framework.Types; using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; using OpenSim.Region.Caches; -using libsecondlife; -using libsecondlife.Packets; namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs index 0456e3c..e4512d1 100644 --- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs +++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs @@ -25,22 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; -using System.Collections.Generic; using libsecondlife; using libsecondlife.Packets; -using Nwc.XmlRpc; -using System.Net; -using System.Net.Sockets; -using System.IO; -using System.Threading; -using System.Timers; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Utilities; -using OpenSim.Assets; +using OpenSim.Framework.Console; namespace OpenSim.Region.ClientStack { @@ -55,7 +42,7 @@ namespace OpenSim.Region.ClientStack protected virtual bool Logout(ClientView simClient, Packet packet) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); + MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); //send reply to let the client logout LogoutReplyPacket logReply = new LogoutReplyPacket(); logReply.AgentData.AgentID = this.AgentID; @@ -120,7 +107,7 @@ namespace OpenSim.Region.ClientStack { if (OnUpdatePrimPosition != null) { - libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); + LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); } //should update stored position of the prim @@ -129,7 +116,7 @@ namespace OpenSim.Region.ClientStack { if (OnUpdatePrimRotation != null) { - libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); + LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); } } @@ -137,7 +124,7 @@ namespace OpenSim.Region.ClientStack { if (OnUpdatePrimScale != null) { - libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); + LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); } } diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 75d3f65..8419906 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs @@ -26,21 +26,13 @@ * */ using System; -using System.Collections; using System.Collections.Generic; +using System.Text; using libsecondlife; using libsecondlife.Packets; -using Nwc.XmlRpc; -using System.Net; -using System.Net.Sockets; -using System.IO; -using System.Threading; -using System.Timers; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Framework.Inventory; +using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; -using OpenSim.Assets; namespace OpenSim.Region.ClientStack { @@ -64,7 +56,7 @@ namespace OpenSim.Region.ClientStack } else { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; switch (Pack.Type) { @@ -452,7 +444,7 @@ namespace OpenSim.Region.ClientStack this.OutPacket(tpStart); TeleportProgressPacket tpProgress = new TeleportProgressPacket(); - tpProgress.Info.Message = (new System.Text.ASCIIEncoding()).GetBytes("sending_landmark"); + tpProgress.Info.Message = (new ASCIIEncoding()).GetBytes("sending_landmark"); tpProgress.Info.TeleportFlags = 8; tpProgress.AgentData.AgentID = tpReq.Info.AgentID; this.OutPacket(tpProgress); diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index a36eeb0..606ca1d 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -25,24 +25,22 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; -using Nwc.XmlRpc; using System.Net; -using System.Net.Sockets; -using System.IO; +using System.Text; using System.Threading; using System.Timers; +using libsecondlife; +using libsecondlife.Packets; +using OpenSim.Assets; using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Framework.Inventory; +using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; -using OpenSim.Assets; using OpenSim.Region.Caches; +using Timer=System.Timers.Timer; namespace OpenSim.Region.ClientStack { @@ -79,7 +77,7 @@ namespace OpenSim.Region.ClientStack private int cachedtextureserial = 0; private RegionInfo m_regionData; protected AuthenticateSessionsBase m_authenticateSessionsHandler; - private System.Text.Encoding enc = System.Text.Encoding.ASCII; + private Encoding enc = Encoding.ASCII; public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions ) { @@ -91,7 +89,7 @@ namespace OpenSim.Region.ClientStack m_inventoryCache = inventoryCache; m_authenticateSessionsHandler = authenSessions; - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request"); + MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request"); cirpack = initialcirpack; userEP = remoteEP; @@ -100,7 +98,7 @@ namespace OpenSim.Region.ClientStack PacketQueue = new BlockingQueue(); this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); - AckTimer = new System.Timers.Timer(500); + AckTimer = new Timer(500); AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); AckTimer.Start(); @@ -189,7 +187,7 @@ namespace OpenSim.Region.ClientStack protected virtual void ClientLoop() { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop"); + MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop"); while (true) { QueItem nextPacket = PacketQueue.Dequeue(); @@ -211,7 +209,7 @@ namespace OpenSim.Region.ClientStack protected virtual void InitNewClient() { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); + MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); this.m_world.AddNewClient(this, false); } @@ -222,12 +220,12 @@ namespace OpenSim.Region.ClientStack if (!sessionInfo.Authorised) { //session/circuit not authorised - OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); + MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); ClientThread.Abort(); } else { - OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); + MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); //session is authorised this.AgentID = cirpack.CircuitCode.ID; this.SessionID = cirpack.CircuitCode.SessionID; diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs index 7d39405..f105978 100644 --- a/OpenSim/Region/ClientStack/ClientViewBase.cs +++ b/OpenSim/Region/ClientStack/ClientViewBase.cs @@ -27,17 +27,14 @@ * */ using System; -using System.Collections; using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; using System.Net; using System.Net.Sockets; -using System.IO; -using System.Threading; using System.Timers; +using libsecondlife; +using libsecondlife.Packets; +using OpenSim.Framework.Console; using OpenSim.Framework.Utilities; -using OpenSim.Framework.Interfaces; namespace OpenSim.Region.ClientStack { @@ -47,7 +44,7 @@ namespace OpenSim.Region.ClientStack protected Dictionary PendingAcks = new Dictionary(); protected Dictionary NeedAck = new Dictionary(); - protected System.Timers.Timer AckTimer; + protected Timer AckTimer; protected uint Sequence = 0; protected object SequenceLock = new object(); protected const int MAX_APPENDED_ACKS = 10; @@ -159,7 +156,7 @@ namespace OpenSim.Region.ClientStack } catch (Exception) { - OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); + MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); this.KillThread(); } @@ -195,8 +192,8 @@ namespace OpenSim.Region.ClientStack else if ((NewPack.Type == PacketType.StartPingCheck)) { //reply to pingcheck - libsecondlife.Packets.StartPingCheckPacket startPing = (libsecondlife.Packets.StartPingCheckPacket)NewPack; - libsecondlife.Packets.CompletePingCheckPacket endPing = new CompletePingCheckPacket(); + StartPingCheckPacket startPing = (StartPingCheckPacket)NewPack; + CompletePingCheckPacket endPing = new CompletePingCheckPacket(); endPing.PingID.PingID = startPing.PingID.PingID; OutPacket(endPing); } @@ -224,7 +221,7 @@ namespace OpenSim.Region.ClientStack { if (Pack.Header.Reliable) { - libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket(); + PacketAckPacket ack_it = new PacketAckPacket(); ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); ack_it.Packets[0].ID = Pack.Header.Sequence; @@ -254,7 +251,7 @@ namespace OpenSim.Region.ClientStack { if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + + MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + (now - packet.TickCount) + "ms have passed"); packet.Header.Resent = true; @@ -273,7 +270,7 @@ namespace OpenSim.Region.ClientStack if (PendingAcks.Count > 250) { // FIXME: Handle the odd case where we have too many pending ACKs queued up - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Too many ACKs queued up!"); + MainLog.Instance.Verbose( "Too many ACKs queued up!"); return; } diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs index 6f20413..b5f0a02 100644 --- a/OpenSim/Region/ClientStack/PacketServer.cs +++ b/OpenSim/Region/ClientStack/PacketServer.cs @@ -25,15 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; -using libsecondlife.Packets; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework; using System.Net; using System.Net.Sockets; +using libsecondlife.Packets; using OpenSim.Assets; +using OpenSim.Framework; +using OpenSim.Framework.Interfaces; using OpenSim.Region.Caches; namespace OpenSim.Region.ClientStack diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 94db8ee..1e99c71 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -26,27 +26,16 @@ * */ using System; -using System.Text; -using System.IO; -using System.Threading; -using System.Net; -using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Region.Terrain; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework; +using System.Net; using OpenSim.Assets; -using OpenSim.Region.Caches; +using OpenSim.Framework; using OpenSim.Framework.Console; -using OpenSim.Physics.Manager; -using Nwc.XmlRpc; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; +using OpenSim.Physics.Manager; +using OpenSim.Region.Caches; namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 8ad5332..6eea524 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs @@ -26,26 +26,15 @@ * */ using System; -using System.Text; -using System.IO; -using System.Threading; +using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using libsecondlife; using libsecondlife.Packets; -using OpenSim.Region.Terrain; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Assets; -using OpenSim.Region.Caches; -using OpenSim.Framework.Console; using OpenSim.Framework; -using Nwc.XmlRpc; -using OpenSim.Framework.Servers; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Region.Caches; namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 7c7c389..5d6ede8 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -25,15 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Framework.Communications; +using OpenSim.Framework.Types; namespace OpenSim.Region.Communications.Local { diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 26834be..43bdd03 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -25,13 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; using libsecondlife; -using OpenSim.Framework.Types; using OpenSim.Framework; using OpenSim.Framework.Communications; +using OpenSim.Framework.Types; namespace OpenSim.Region.Communications.Local { @@ -163,7 +161,7 @@ namespace OpenSim.Region.Communications.Local /// /// /// - public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) { if (this.regionHosts.ContainsKey(regionHandle)) { diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index b441a8d..592b36c 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -1,17 +1,11 @@ using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; - +using libsecondlife; using OpenSim.Framework.Communications; -//using OpenSim.Framework.User; -using OpenSim.Framework.UserManagement; using OpenSim.Framework.Data; using OpenSim.Framework.Types; +using OpenSim.Framework.UserManagement; using OpenSim.Framework.Utilities; -using libsecondlife; - namespace OpenSim.Region.Communications.Local { public class LocalUserServices : UserManagerBase, IUserServices diff --git a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs index 1eb7107..9afb75e 100644 --- a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 870f577..0a0847e 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Types; using OpenSim.Framework.Communications; +using OpenSim.Framework.Types; + namespace OpenSim.Region.Communications.OGS1 { public class CommunicationsOGS1 : CommunicationsManager diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 977b131..1706c6d 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -1,19 +1,17 @@ using System; -using System.Collections.Generic; using System.Collections; -using System.Text; +using System.Collections.Generic; +using System.Net; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; - -using OpenSim.Framework.Servers; +using libsecondlife; +using Nwc.XmlRpc; using OpenSim.Framework; -using OpenSim.Framework.Types; using OpenSim.Framework.Communications; - -using Nwc.XmlRpc; -using libsecondlife; -using System.Net; +using OpenSim.Framework.Console; +using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; namespace OpenSim.Region.Communications.OGS1 { @@ -52,7 +50,7 @@ namespace OpenSim.Region.Communications.OGS1 if (GridRespData.ContainsKey("error")) { string errorstring = (string)GridRespData["error"]; - OpenSim.Framework.Console.MainLog.Instance.Error("Unable to connect to grid: " + errorstring); + MainLog.Instance.Error("Unable to connect to grid: " + errorstring); return null; } @@ -103,7 +101,7 @@ namespace OpenSim.Region.Communications.OGS1 public RegionInfo RequestNeighbourInfo(ulong regionHandle) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented - RequestNeighbourInfo()"); + MainLog.Instance.Warn("Unimplemented - RequestNeighbourInfo()"); return null; } @@ -184,7 +182,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - OpenSim.Framework.Console.MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString()); + MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString()); } return new XmlRpcResponse(); @@ -215,7 +213,7 @@ namespace OpenSim.Region.Communications.OGS1 return false; } - public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) { if (this.listeners.ContainsKey(regionHandle)) { @@ -239,7 +237,7 @@ namespace OpenSim.Region.Communications.OGS1 return false; } - public bool IncomingArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position) { if (this.listeners.ContainsKey(regionHandle)) { diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 51b33e9..f514a29 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs @@ -1,12 +1,11 @@ using System; -using System.Collections.Generic; -using System.Text; +using libsecondlife; using OpenSim.Framework.Types; -using OpenSim.Framework.Communications; + namespace OpenSim.Region.Communications.OGS1 { public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData); - public delegate bool ExpectArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position); + public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position); public sealed class InterRegionSingleton { @@ -40,7 +39,7 @@ namespace OpenSim.Region.Communications.OGS1 return false; } - public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) { if (OnArrival != null) { @@ -62,7 +61,7 @@ namespace OpenSim.Region.Communications.OGS1 return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData); } - public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) { return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position); } diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 6d428d0..7c7db03 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -1,13 +1,9 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Types; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Data; using libsecondlife; - using Nwc.XmlRpc; +using OpenSim.Framework.Communications; +using OpenSim.Framework.Data; namespace OpenSim.Region.Communications.OGS1 { diff --git a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs index 0c6f965..41f811a 100644 --- a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index c2c1ecf..b5a74ad 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs @@ -28,13 +28,12 @@ using System; using System.Collections.Generic; using System.Text; -using OpenSim.Framework.Types; -using OpenSim.Framework.Interfaces; -using OpenSim.Region.Environment; -using OpenSim.Region.Environment.Scenes; -using OpenSim; using libsecondlife; using libsecondlife.Packets; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; +using OpenSim.Region.Environment.Scenes; using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence; @@ -79,30 +78,30 @@ namespace OpenSim.Region.Environment case "setregioninfo": if (packet.ParamList.Length != 9) { - OpenSim.Framework.Console.MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); + MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); } else { - m_regInfo.estateSettings.regionFlags = libsecondlife.Simulator.RegionFlags.None; + m_regInfo.estateSettings.regionFlags = Simulator.RegionFlags.None; if (convertParamStringToBool(packet.ParamList[0].Parameter)) { - m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockTerraform; + m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.BlockTerraform; } if (convertParamStringToBool(packet.ParamList[1].Parameter)) { - m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.NoFly; + m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.NoFly; } if (convertParamStringToBool(packet.ParamList[2].Parameter)) { - m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowDamage; + m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.AllowDamage; } if (convertParamStringToBool(packet.ParamList[3].Parameter) == false) { - m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockLandResell; + m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.BlockLandResell; } @@ -113,17 +112,17 @@ namespace OpenSim.Region.Environment m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor; int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter)); - m_regInfo.estateSettings.simAccess = (libsecondlife.Simulator.SimAccess)tempMatureLevel; + m_regInfo.estateSettings.simAccess = (Simulator.SimAccess)tempMatureLevel; if (convertParamStringToBool(packet.ParamList[7].Parameter)) { - m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.RestrictPushObject; + m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.RestrictPushObject; } if (convertParamStringToBool(packet.ParamList[8].Parameter)) { - m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowParcelChanges; + m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.AllowParcelChanges; } sendRegionInfoPacketToAll(); @@ -223,7 +222,7 @@ namespace OpenSim.Region.Environment case "setregionterrain": if (packet.ParamList.Length != 9) { - OpenSim.Framework.Console.MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); + MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); } else { @@ -237,7 +236,7 @@ namespace OpenSim.Region.Environment } break; default: - OpenSim.Framework.Console.MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); + MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); break; } } @@ -265,7 +264,7 @@ namespace OpenSim.Region.Environment public void sendRegionInfoPacket(IClientAPI remote_client) { - Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; AgentCircuitData circuitData = remote_client.RequestClientInfo(); diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs index 3afbe6e..2059b3f 100644 --- a/OpenSim/Region/Environment/ParcelManager.cs +++ b/OpenSim/Region/Environment/ParcelManager.cs @@ -27,7 +27,6 @@ */ using System; using System.Collections.Generic; -using System.Text; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Interfaces; @@ -43,7 +42,7 @@ namespace OpenSim.Region.Environment /// /// Handles Parcel objects and operations requiring information from other Parcel objects (divide, join, etc) /// - public class ParcelManager : OpenSim.Framework.Interfaces.ILocalStorageParcelReceiver + public class ParcelManager : ILocalStorageParcelReceiver { #region Constants @@ -420,7 +419,7 @@ namespace OpenSim.Region.Environment { for (y = 0; y < inc_y; y++) { - OpenSim.Region.Environment.Parcel currentParcel = getParcel(start_x + x, start_y + y); + Parcel currentParcel = getParcel(start_x + x, start_y + y); if (!temp.Contains(currentParcel)) { currentParcel.forceUpdateParcelInfo(); @@ -429,10 +428,10 @@ namespace OpenSim.Region.Environment } } - int requestResult = ParcelManager.PARCEL_RESULT_ONE_PARCEL; + int requestResult = PARCEL_RESULT_ONE_PARCEL; if (temp.Count > 1) { - requestResult = ParcelManager.PARCEL_RESULT_MULTIPLE_PARCELS; + requestResult = PARCEL_RESULT_MULTIPLE_PARCELS; } for (i = 0; i < temp.Count; i++) @@ -571,7 +570,7 @@ namespace OpenSim.Region.Environment updatePacket.ParcelData.Bitmap = parcelData.parcelBitmapByteArray; - updatePacket.ParcelData.Desc = libsecondlife.Helpers.StringToField(parcelData.parcelDesc); + updatePacket.ParcelData.Desc = Helpers.StringToField(parcelData.parcelDesc); updatePacket.ParcelData.Category = (byte)parcelData.category; updatePacket.ParcelData.ClaimDate = parcelData.claimDate; updatePacket.ParcelData.ClaimPrice = parcelData.claimPrice; @@ -631,7 +630,7 @@ namespace OpenSim.Region.Environment parcelData.mediaID = packet.ParcelData.MediaID; parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL); parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL); - parcelData.parcelName = libsecondlife.Helpers.FieldToUTF8String(packet.ParcelData.Name); + parcelData.parcelName = Helpers.FieldToUTF8String(packet.ParcelData.Name); parcelData.parcelFlags = (libsecondlife.Parcel.ParcelFlags)packet.ParcelData.ParcelFlags; parcelData.passHours = packet.ParcelData.PassHours; parcelData.passPrice = packet.ParcelData.PassPrice; diff --git a/OpenSim/Region/Environment/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs index 4ff55a8..cd67e97 100644 --- a/OpenSim/Region/Environment/RegionManager.cs +++ b/OpenSim/Region/Environment/RegionManager.cs @@ -1,11 +1,9 @@ -using System; using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Communications; using OpenSim.Framework; -using OpenSim.Framework.Types; +using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Region.Capabilities; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment { @@ -17,7 +15,7 @@ namespace OpenSim.Region.Environment protected List capsHandlers = new List(); protected BaseHttpServer httpListener; - protected Scenes.Scene m_Scene; + protected Scene m_Scene; public ParcelManager parcelManager; public EstateManager estateManager; diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs index 6db57a4..c697faa 100644 --- a/OpenSim/Region/Environment/Scenes/Entity.cs +++ b/OpenSim/Region/Environment/Scenes/Entity.cs @@ -26,11 +26,8 @@ * */ using System; -using System.Collections.Generic; -using System.Text; -using Axiom.MathLib; -using OpenSim.Physics.Manager; using libsecondlife; +using OpenSim.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 63f3f5d..a8eb9ce 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs @@ -1,6 +1,4 @@ -using System; using System.Collections.Generic; -using System.Text; using Axiom.MathLib; using libsecondlife; @@ -8,7 +6,7 @@ namespace OpenSim.Region.Environment.Scenes { public abstract class EntityBase { - public libsecondlife.LLUUID uuid; + public LLUUID uuid; protected List children; @@ -83,7 +81,7 @@ namespace OpenSim.Region.Environment.Scenes /// public EntityBase() { - uuid = new libsecondlife.LLUUID(); + uuid = new LLUUID(); m_pos = new LLVector3(); velocity = new LLVector3(); diff --git a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs index 36023d0..7c3a033 100644 --- a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs +++ b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; using libsecondlife.Packets; -using OpenSim.Physics.Manager; using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; namespace OpenSim.Region.Environment.Scenes { diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index b8ec68b..a767bd2 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; -using System.Text; +using Axiom.MathLib; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Interfaces; -using OpenSim.Physics.Manager; -using OpenSim.Framework.Types; using OpenSim.Framework.Inventory; +using OpenSim.Framework.Types; namespace OpenSim.Region.Environment.Scenes { @@ -266,7 +265,7 @@ namespace OpenSim.Region.Environment.Scenes public void SendTerseUpdateToClient(IClientAPI RemoteClient) { LLVector3 lPos; - Axiom.MathLib.Quaternion lRot; + Quaternion lRot; lPos = this.Pos; lRot = this.rotation; diff --git a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs index d703857..4213a18 100644 --- a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs +++ b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs @@ -29,12 +29,13 @@ using System; using System.Collections.Generic; using System.Text; +using Axiom.MathLib; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Interfaces; -using OpenSim.Physics.Manager; -using OpenSim.Framework.Types; using OpenSim.Framework.Inventory; +using OpenSim.Framework.Types; +using OpenSim.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { @@ -174,9 +175,9 @@ namespace OpenSim.Region.Environment.Scenes dataArrays.Add(primData.ToBytes()); foreach (Entity child in children) { - if (child is OpenSim.Region.Environment.Scenes.PrimitiveOld) + if (child is PrimitiveOld) { - dataArrays.Add(((OpenSim.Region.Environment.Scenes.PrimitiveOld)child).GetByteArray()); + dataArrays.Add(((PrimitiveOld)child).GetByteArray()); } } byte[] primstart = Helpers.StringToField(""); @@ -351,7 +352,7 @@ namespace OpenSim.Region.Environment.Scenes /// public byte[] ConvertInventoryToBytes() { - System.Text.Encoding enc = System.Text.Encoding.ASCII; + Encoding enc = Encoding.ASCII; byte[] result = new byte[0]; List inventoryData = new List(); int totallength = 0; @@ -434,7 +435,7 @@ namespace OpenSim.Region.Environment.Scenes public void SendTerseUpdateToClient(IClientAPI RemoteClient) { LLVector3 lPos; - Axiom.MathLib.Quaternion lRot; + Quaternion lRot; if (this._physActor != null && this.physicsEnabled) //is this needed ? doesn't the property fields do this for us? { PhysicsVector pPos = this._physActor.Position; diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index d8533b0..669039f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -27,14 +27,10 @@ */ using System; using System.Collections.Generic; -using System.Text; using libsecondlife; using libsecondlife.Packets; -using OpenSim.Physics.Manager; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Utilities; namespace OpenSim.Region.Environment.Scenes { @@ -253,7 +249,7 @@ namespace OpenSim.Region.Environment.Scenes { if (((SceneObject)ent).rootLocalID == primLocalID) { - ((OpenSim.Region.Environment.Scenes.SceneObject)ent).GetProperites(remoteClient); + ((SceneObject)ent).GetProperites(remoteClient); break; } } @@ -349,7 +345,7 @@ namespace OpenSim.Region.Environment.Scenes { if (ent.LocalId == localID) { - ((OpenSim.Region.Environment.Scenes.PrimitiveOld)ent).UpdatePosition(pos); + ((PrimitiveOld)ent).UpdatePosition(pos); break; } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 059bfd7..2bc3f8c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -26,27 +26,23 @@ * */ using System; -using libsecondlife; -using libsecondlife.Packets; using System.Collections.Generic; -using System.Text; -using System.Reflection; -using System.IO; using System.Threading; using System.Timers; -using OpenSim.Physics.Manager; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework.Inventory; +using libsecondlife; +using libsecondlife.Packets; using OpenSim.Framework; -using OpenSim.Region.Terrain; using OpenSim.Framework.Communications; -using OpenSim.Region.Caches; -using OpenSim.Region.Environment; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; +using OpenSim.Physics.Manager; +using OpenSim.Region.Caches; using OpenSim.Region.Enviorment.Scripting; -using OpenSim.Region.Capabilities; -using Caps = OpenSim.Region.Capabilities.Caps; +using OpenSim.Region.Terrain; +using Caps=OpenSim.Region.Capabilities.Caps; +using Timer=System.Timers.Timer; namespace OpenSim.Region.Environment.Scenes { @@ -54,9 +50,9 @@ namespace OpenSim.Region.Environment.Scenes public partial class Scene : SceneBase, ILocalStorageReceiver { - protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); - protected Dictionary Avatars; - protected Dictionary Prims; + protected Timer m_heartbeatTimer = new Timer(); + protected Dictionary Avatars; + protected Dictionary Prims; private PhysicsScene phyScene; private float timeStep = 0.1f; private Random Rand = new Random(); @@ -119,12 +115,12 @@ namespace OpenSim.Region.Environment.Scenes scriptManager = new ScriptManager(this); eventManager = new EventManager(); - OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating new entitities instance"); - Entities = new Dictionary(); + MainLog.Instance.Verbose("World.cs - creating new entitities instance"); + Entities = new Dictionary(); Avatars = new Dictionary(); Prims = new Dictionary(); - OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating LandMap"); + MainLog.Instance.Verbose("World.cs - creating LandMap"); Terrain = new TerrainEngine(); ScenePresence.LoadAnims(); @@ -151,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - void Heartbeat(object sender, System.EventArgs e) + void Heartbeat(object sender, EventArgs e) { this.Update(); } @@ -170,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes } - foreach (libsecondlife.LLUUID UUID in Entities.Keys) + foreach (LLUUID UUID in Entities.Keys) { Entities[UUID].updateMovement(); } @@ -180,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes this.phyScene.Simulate(timeStep); } - foreach (libsecondlife.LLUUID UUID in Entities.Keys) + foreach (LLUUID UUID in Entities.Keys) { Entities[UUID].update(); } @@ -198,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString()); } updateLock.ReleaseMutex(); @@ -237,14 +233,14 @@ namespace OpenSim.Region.Environment.Scenes this.SendLayerData(client); } - foreach (libsecondlife.LLUUID UUID in Entities.Keys) + foreach (LLUUID UUID in Entities.Keys) { Entities[UUID].LandRenegerated(); } } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); } } @@ -268,14 +264,14 @@ namespace OpenSim.Region.Environment.Scenes this.SendLayerData(client); } - foreach (libsecondlife.LLUUID UUID in Entities.Keys) + foreach (LLUUID UUID in Entities.Keys) { Entities[UUID].LandRenegerated(); } } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); } } @@ -301,7 +297,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); } } @@ -351,7 +347,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); } } @@ -382,12 +378,12 @@ namespace OpenSim.Region.Environment.Scenes { try { - OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); + MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); this.localStorage.LoadPrimitives(this); } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); } } @@ -428,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString()); } } @@ -482,10 +478,10 @@ namespace OpenSim.Region.Environment.Scenes { ScenePresence newAvatar = null; - OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); + MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); newAvatar = new ScenePresence(client, this, this.m_regInfo); - OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake "); + MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world"); + MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake "); PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); lock (this.m_syncRoot) @@ -638,7 +634,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public void AgentCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position) + public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) { if (regionHandle == this.m_regInfo.RegionHandle) { diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 817f206..4036743 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -26,25 +26,20 @@ * */ using System; -using libsecondlife; -using libsecondlife.Packets; using System.Collections.Generic; -using System.Text; using System.Reflection; -using System.IO; -using System.Threading; -using OpenSim.Physics.Manager; +using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using OpenSim.Framework.Inventory; -using OpenSim.Region.Terrain; using OpenSim.Region.Caches; +using OpenSim.Region.Terrain; namespace OpenSim.Region.Environment.Scenes { public abstract class SceneBase : IWorld { - public Dictionary Entities; + public Dictionary Entities; protected Dictionary m_clientThreads; protected ulong m_regionHandle; protected string m_regionName; @@ -113,7 +108,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); return false; } } @@ -191,7 +186,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); + MainLog.Instance.WriteLine(LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); } } diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index ac887c0..9e383c6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using libsecondlife; namespace OpenSim.Region.Environment.Scenes { @@ -18,7 +16,7 @@ namespace OpenSim.Region.Environment.Scenes public delegate void OnNewPrimitiveDelegate(PrimitiveOld prim); public event OnNewPrimitiveDelegate OnNewPrimitive; - public delegate void OnRemovePresenceDelegate(libsecondlife.LLUUID uuid); + public delegate void OnRemovePresenceDelegate(LLUUID uuid); public event OnRemovePresenceDelegate OnRemovePresence; public void TriggerOnFrame() @@ -41,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes OnNewPresence(presence); } - public void TriggerOnRemovePresence(libsecondlife.LLUUID uuid) + public void TriggerOnRemovePresence(LLUUID uuid) { if (OnRemovePresence != null) { diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index c03354e..04ed408 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs @@ -25,21 +25,18 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; using System.Text; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework.Interfaces; using OpenSim.Physics.Manager; -using OpenSim.Framework.Types; -using OpenSim.Framework.Inventory; namespace OpenSim.Region.Environment.Scenes { public class SceneObject : EntityBase { - private System.Text.Encoding enc = System.Text.Encoding.ASCII; + private Encoding enc = Encoding.ASCII; private Dictionary ChildPrimitives = new Dictionary(); //list of all primitive id's that are part of this group public Primitive rootPrimitive; private Scene m_world; diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs index 2caabc2..d1f75ed 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs @@ -25,11 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; -using libsecondlife; using System.Xml; +using libsecondlife; namespace OpenSim.Region.Environment.Scenes { @@ -66,7 +64,7 @@ namespace OpenSim.Region.Environment.Scenes // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); - foreach (KeyValuePair kp in OpenSim.Region.Environment.Scenes.ScenePresence.Animations.AnimsLLUUID) + foreach (KeyValuePair kp in Animations.AnimsLLUUID) { AnimsNames.Add(kp.Value, kp.Key); } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs index 2c81d2a..dbb5d3f 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs @@ -25,14 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; using libsecondlife.Packets; -using OpenSim.Physics.Manager; using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; namespace OpenSim.Region.Environment.Scenes { diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 8a8f5ae..dcca848 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -28,14 +28,13 @@ using System; using System.Collections.Generic; using System.IO; -using System.Text; +using Axiom.MathLib; using libsecondlife; using libsecondlife.Packets; -using OpenSim.Physics.Manager; -using OpenSim.Framework.Inventory; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using Axiom.MathLib; +using OpenSim.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { @@ -53,7 +52,7 @@ namespace OpenSim.Region.Environment.Scenes private byte movementflag = 0; private List forcesList = new List(); private short _updateCount = 0; - private Axiom.MathLib.Quaternion bodyRot; + private Quaternion bodyRot; private LLObject.TextureEntry avatarAppearanceTexture = null; private byte[] visualParams; private AvatarWearable[] Wearables; @@ -110,7 +109,7 @@ namespace OpenSim.Region.Environment.Scenes m_regionInfo = reginfo; m_regionHandle = reginfo.RegionHandle; - OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs "); + MainLog.Instance.Verbose("Avatar.cs "); ControllingClient = theClient; this.firstname = ControllingClient.FirstName; this.lastname = ControllingClient.LastName; @@ -240,7 +239,7 @@ namespace OpenSim.Region.Environment.Scenes bool update_rotation = false; bool DCFlagKeyPressed = false; Vector3 agent_control_v3 = new Vector3(0, 0, 0); - Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); + Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); @@ -278,10 +277,10 @@ namespace OpenSim.Region.Environment.Scenes } - protected void AddNewMovement(Axiom.MathLib.Vector3 vec, Axiom.MathLib.Quaternion rotation) + protected void AddNewMovement(Vector3 vec, Quaternion rotation) { NewForce newVelocity = new NewForce(); - Axiom.MathLib.Vector3 direc = rotation * vec; + Vector3 direc = rotation * vec; direc.Normalize(); direc = direc * ((0.03f) * 128f); diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs index fc193f5..56f5c0b 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs @@ -26,13 +26,10 @@ * */ using System; -using System.Collections.Generic; -using System.Text; - -// Compilation stuff -using System.CodeDom; using System.CodeDom.Compiler; +using System.Collections.Generic; using Microsoft.CSharp; +using OpenSim.Framework.Console; namespace OpenSim.Region.Enviorment.Scripting { @@ -60,10 +57,10 @@ namespace OpenSim.Region.Enviorment.Scripting if (compilerResults.Errors.Count > 0) { - OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors"); + MainLog.Instance.Error("Compile errors"); foreach (CompilerError error in compilerResults.Errors) { - OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); + MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); } } else diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs index e6d66eb..2cea6e0 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs @@ -26,13 +26,10 @@ * */ using System; -using System.Collections.Generic; -using System.Text; - -// Compilation stuff -using System.CodeDom; using System.CodeDom.Compiler; +using System.Collections.Generic; using Microsoft.JScript; +using OpenSim.Framework.Console; namespace OpenSim.Region.Enviorment.Scripting { @@ -60,10 +57,10 @@ namespace OpenSim.Region.Enviorment.Scripting if (compilerResults.Errors.Count > 0) { - OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors"); + MainLog.Instance.Error("Compile errors"); foreach (CompilerError error in compilerResults.Errors) { - OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); + MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); } } else diff --git a/OpenSim/Region/Environment/Scenes/scripting/Script.cs b/OpenSim/Region/Environment/Scenes/scripting/Script.cs index 1e64675..8029883 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/Script.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/Script.cs @@ -25,13 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - -using OpenSim.Framework.Console; -using OpenSim.Framework; -using OpenSim.Region.Environment; using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Enviorment.Scripting @@ -54,7 +47,7 @@ namespace OpenSim.Region.Enviorment.Scripting public void Initialise(ScriptInfo scriptInfo) { script = scriptInfo; - script.events.OnFrame += new OpenSim.Region.Environment.Scenes.EventManager.OnFrameDelegate(events_OnFrame); + script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame); script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); } diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index 522a572..d984d60 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs @@ -25,12 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework.Console; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Enviorment.Scripting { @@ -52,7 +48,7 @@ namespace OpenSim.Region.Enviorment.Scripting { world = scene; events = world.eventManager; - logger = OpenSim.Framework.Console.MainLog.Instance; + logger = MainLog.Instance; } } } diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs index eb1c1d9..1d47c24 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs @@ -25,16 +25,16 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; +using OpenSim.Framework.Console; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Enviorment.Scripting { public class ScriptManager { List scripts = new List(); - OpenSim.Region.Environment.Scenes.Scene scene; + Scene scene; Dictionary compilers = new Dictionary(); private void LoadFromCompiler(Dictionary compiledscripts) @@ -42,14 +42,14 @@ namespace OpenSim.Region.Enviorment.Scripting foreach (KeyValuePair script in compiledscripts) { ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. - OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading " + script.Key); + MainLog.Instance.Verbose("Loading " + script.Key); script.Value.Initialise(scriptInfo); scripts.Add(script.Value); } - OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); + MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); } - public ScriptManager(OpenSim.Region.Environment.Scenes.Scene world) + public ScriptManager(Scene world) { scene = world; @@ -82,7 +82,7 @@ namespace OpenSim.Region.Enviorment.Scripting break; default: - OpenSim.Framework.Console.MainLog.Instance.Error("Unknown script command"); + MainLog.Instance.Error("Unknown script command"); break; } } diff --git a/OpenSim/Region/Examples/SimpleApp/LlsdMethodEntry.cs b/OpenSim/Region/Examples/SimpleApp/LlsdMethodEntry.cs index c3d3d33..f946482 100644 --- a/OpenSim/Region/Examples/SimpleApp/LlsdMethodEntry.cs +++ b/OpenSim/Region/Examples/SimpleApp/LlsdMethodEntry.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; +using System.Collections; using System.Text; -using OpenSim.Framework.Servers; -using OpenSim.Region.Capabilities; using libsecondlife; -using System.Collections; +using OpenSim.Region.Capabilities; namespace OpenSim.Framework.Servers { @@ -28,7 +25,7 @@ namespace OpenSim.Framework.Servers public string Handle(string body, string path) { - Encoding _enc = System.Text.Encoding.UTF8; + Encoding _enc = Encoding.UTF8; Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(_enc.GetBytes( body )); TRequest request = new TRequest(); diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index 8e6fd8f..3245223 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs @@ -1,23 +1,19 @@ -using System; using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework.Console; using libsecondlife; -using OpenSim.Region.Environment; -using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; -using OpenSim.Region.Caches; using OpenSim.Framework.Communications; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; +using OpenSim.Region.Caches; +using OpenSim.Region.Environment.Scenes; +using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; namespace SimpleApp { public class MyWorld : Scene { - private List m_avatars; + private List m_avatars; public MyWorld(Dictionary clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) : base(clientThreads, regionInfo, authen, commsMan, assetCach, httpServer) diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 6bf6657..bc84c35 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -1,23 +1,18 @@ using System; -using System.Collections.Generic; -using System.Text; -using OpenSim; -using OpenSim.Region.GridInterfaces.Local; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework.Console; -using OpenSim.Framework.Servers; -using OpenSim.Assets; +using System.Net; using libsecondlife; +using OpenSim.Assets; using OpenSim.Framework; -using OpenSim.Region.Caches; -using OpenSim.Framework.Communications; -using OpenSim.Region.Communications.Local; -using OpenSim.Region.ClientStack; -using System.Net; -using libsecondlife.Packets; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; using OpenSim.Physics.Manager; +using OpenSim.Region.Caches; using OpenSim.Region.Capabilities; +using OpenSim.Region.ClientStack; +using OpenSim.Region.Communications.Local; +using OpenSim.Region.GridInterfaces.Local; namespace SimpleApp { diff --git a/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs index 0f9bf0f..3b0de8a 100644 --- a/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs index 52ecd6b..b5fc1ef 100644 --- a/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs +++ b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs index 95d03f1..bd303e1 100644 --- a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs @@ -26,17 +26,15 @@ * */ using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; using System.IO; +using System.Threading; +using Db4objects.Db4o; +using Db4objects.Db4o.Query; +using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using libsecondlife; -using Db4objects.Db4o; -using Db4objects.Db4o.Query; namespace OpenSim.Region.GridInterfaces.Local { @@ -64,19 +62,19 @@ namespace OpenSim.Region.GridInterfaces.Local { bool yapfile; this._assetRequests = new BlockingQueue(); - yapfile = System.IO.File.Exists("assets.yap"); + yapfile = File.Exists("assets.yap"); - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Local Asset Server class created"); + MainLog.Instance.Verbose( "Local Asset Server class created"); try { db = Db4oFactory.OpenFile("assets.yap"); - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Db4 Asset database creation"); + MainLog.Instance.Verbose( "Db4 Asset database creation"); } catch (Exception e) { db.Close(); - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } if (!yapfile) { @@ -124,7 +122,7 @@ namespace OpenSim.Region.GridInterfaces.Local { if (db != null) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Closing local asset server database"); + MainLog.Instance.Verbose( "Closing local asset server database"); db.Close(); } } @@ -168,7 +166,7 @@ namespace OpenSim.Region.GridInterfaces.Local try { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Setting up asset database"); + MainLog.Instance.Verbose( "Setting up asset database"); AssetBase Image = new AssetBase(); Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); @@ -281,7 +279,7 @@ namespace OpenSim.Region.GridInterfaces.Local //should request Asset from storage manager //but for now read from file - string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; + string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; string fileName = Path.Combine(dataPath, filename); FileInfo fInfo = new FileInfo(fileName); long numBytes = fInfo.Length; diff --git a/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs index 51596d0..1e15c5e 100644 --- a/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs +++ b/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs b/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs index 4652f70..8643736 100644 --- a/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs +++ b/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs @@ -25,14 +25,12 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; +using System.IO; +using System.Net; using System.Text; using System.Threading; -using System.Net; -using System.Net.Sockets; -using System.IO; using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; @@ -53,7 +51,7 @@ namespace OpenSim.Region.GridInterfaces.Remote this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests)); this._remoteAssetServerThread.IsBackground = true; this._remoteAssetServerThread.Start(); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Remote Asset Server class created"); + MainLog.Instance.Verbose("Remote Asset Server class created"); } public void SetReceiver(IAssetReceiver receiver) diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 177c49d..ce567a9 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e3f34da..393796f 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; +using Axiom.MathLib; using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin @@ -250,11 +250,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs index 132f64a..9415db9 100644 --- a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 502d8e6..8c286e0 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -25,15 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; +using Axiom.MathLib; namespace OpenSim.Physics.Manager { public delegate void PositionUpdate(PhysicsVector position); public delegate void VelocityUpdate(PhysicsVector velocity); - public delegate void OrientationUpdate(Axiom.MathLib.Quaternion orientation); + public delegate void OrientationUpdate(Quaternion orientation); public abstract class PhysicsActor { @@ -66,7 +64,7 @@ namespace OpenSim.Physics.Manager get; } - public abstract Axiom.MathLib.Quaternion Orientation + public abstract Quaternion Orientation { get; set; @@ -115,11 +113,11 @@ namespace OpenSim.Physics.Manager } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { diff --git a/OpenSim/Region/Physics/Manager/PhysicsManager.cs b/OpenSim/Region/Physics/Manager/PhysicsManager.cs index 0e28522..265bce6 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsManager.cs @@ -27,10 +27,8 @@ */ using System; using System.Collections.Generic; -using System.Collections; using System.IO; using System.Reflection; -using Axiom.MathLib; using OpenSim.Framework.Console; namespace OpenSim.Physics.Manager @@ -56,19 +54,19 @@ namespace OpenSim.Physics.Manager if(_plugins.ContainsKey(engineName)) { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); + MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); return _plugins[engineName].GetScene(); } else { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); + MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName)); } } public void LoadPlugins() { - string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory ,"Physics"); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ,"Physics"); string[] pluginFiles = Directory.GetFiles(path, "*.dll"); diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 3f22585..d44da00 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using OpenSim.Framework.Console; namespace OpenSim.Physics.Manager @@ -67,7 +64,7 @@ namespace OpenSim.Physics.Manager public override PhysicsActor AddAvatar(PhysicsVector position) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position); + MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position); return PhysicsActor.Null; } @@ -78,7 +75,7 @@ namespace OpenSim.Physics.Manager public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); + MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); return PhysicsActor.Null; } @@ -91,12 +88,12 @@ namespace OpenSim.Physics.Manager public override void GetResults() { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : GetResults()"); + MainLog.Instance.Verbose("NullPhysicsScene : GetResults()"); } public override void SetTerrain(float[] heightMap) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); + MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); } public override void DeleteTerrain() diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs index c60da9d..e75f29b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Physics.Manager { public class PhysicsVector diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs index b49c8da..ee10430 100644 --- a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 8aca851..b85c052 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -27,8 +27,9 @@ */ using System; using System.Collections.Generic; -using OpenSim.Physics.Manager; +using Axiom.MathLib; using Ode.NET; +using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.OdePlugin { @@ -194,13 +195,13 @@ namespace OpenSim.Region.Physics.OdePlugin LandGeom = d.CreateHeightfield(space, HeightmapData, 1); d.Matrix3 R = new d.Matrix3(); - Axiom.MathLib.Quaternion q1 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(1,0,0)); - Axiom.MathLib.Quaternion q2 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(0,1,0)); + Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0)); + Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0)); //Axiom.MathLib.Quaternion q3 = Axiom.MathLib.Quaternion.FromAngleAxis(3.14f, new Axiom.MathLib.Vector3(0, 0, 1)); q1 = q1 * q2; //q1 = q1 * q3; - Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(); + Vector3 v3 = new Vector3(); float angle = 0; q1.ToAngleAxis(ref angle, ref v3); @@ -287,11 +288,11 @@ namespace OpenSim.Region.Physics.OdePlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { @@ -414,11 +415,11 @@ namespace OpenSim.Region.Physics.OdePlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion(); + Quaternion res = new Quaternion(); return res; } set diff --git a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs index b49c8da..ee10430 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 8bf794b..a75e5c7 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using OpenSim.Physics.Manager; using PhysXWrapper; +using Quaternion=Axiom.MathLib.Quaternion; namespace OpenSim.Region.Physics.PhysXPlugin { @@ -240,11 +241,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { @@ -377,11 +378,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion(); + Quaternion res = new Quaternion(); PhysXWrapper.Quaternion quat = this._prim.GetOrientation(); res.w = quat.W; res.x = quat.X; diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs index 3bc6f25..39ba6e4 100644 --- a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs @@ -29,15 +29,10 @@ // BDB Support // Apparently broken on Mono -using System; -using System.Collections.Generic; -using System.Data; +using BerkeleyDb; using libsecondlife; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using BerkeleyDb; -using Kds.Serialization; -using Kds.Serialization.Buffer; namespace OpenSim.Region.Storage.LocalStorageBDB { @@ -52,7 +47,7 @@ namespace OpenSim.Region.Storage.LocalStorageBDB public BDBLocalStorage() { DB = new Db(DbCreateFlags.None); - sim = (DbHash)DB.Open(null, simDbName, null, BerkeleyDb.DbType.Hash, Db.OpenFlags.Create, 0); + sim = (DbHash)DB.Open(null, simDbName, null, DbType.Hash, Db.OpenFlags.Create, 0); //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); } diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs index ea2b62e..4463ac9 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs index 5cb4861..8214bc8 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs @@ -26,15 +26,11 @@ * */ using System; -using System.Collections.Generic; using Db4objects.Db4o; -using Db4objects.Db4o.Query; - using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; -using OpenSim.Framework.Console; - namespace OpenSim.Region.Storage.LocalStorageDb4o { @@ -53,18 +49,18 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o public void Initialise(string dfile) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile); + MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile); datastore = dfile; try { db = Db4oFactory.OpenFile(datastore); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage creation"); + MainLog.Instance.Verbose("Db4LocalStorage creation"); } catch (Exception e) { db.Close(); - OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } } @@ -123,7 +119,7 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o public void LoadPrimitives(ILocalStorageReceiver receiver) { IObjectSet result = db.Get(typeof(PrimData)); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); + MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); foreach (PrimData prim in result) { receiver.PrimFromStorage(prim); @@ -132,13 +128,13 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o public float[] LoadWorld() { - OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Loading world...."); + MainLog.Instance.Verbose("LoadWorld() - Loading world...."); float[] heightmap = null; - OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); + MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); IObjectSet world_result = db.Get(typeof(MapStorage)); if (world_result.Count > 0) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); + MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); MapStorage map = (MapStorage)world_result.Next(); //blank.LandMap = map.Map; heightmap = map.Map; @@ -151,7 +147,7 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o IObjectSet world_result = db.Get(typeof(MapStorage)); if (world_result.Count > 0) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); + MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); MapStorage map = (MapStorage)world_result.Next(); db.Delete(map); } diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs index 22f3392..ec82d02 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Storage.LocalStorageDb4o { public class MapStorage diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs index dcbe639..6e6768c 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs @@ -25,13 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using Db4objects.Db4o; using Db4objects.Db4o.Query; using libsecondlife; -using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; namespace OpenSim.Region.Storage.LocalStorageDb4o diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs index 23de6dd..eb309cb 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs @@ -25,13 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using Db4objects.Db4o; using Db4objects.Db4o.Query; using libsecondlife; -using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; namespace OpenSim.Region.Storage.LocalStorageDb4o diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs index 80158d5..ea9cda8 100644 --- a/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs index b407be4..9900a98 100644 --- a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs @@ -30,10 +30,10 @@ // A bad idea, but the IRC people told me to! using System; -using System.Collections.Generic; using System.Data; using System.Data.SQLite; using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; @@ -54,8 +54,8 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite catch (Exception e) { db.Close(); - OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } } @@ -117,8 +117,8 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } cmd.Dispose(); @@ -144,8 +144,8 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } cmd.Dispose(); diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs index 7d10ae3..9c721d1 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index 0f450c3..6c9ec26 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -27,8 +27,9 @@ */ using System; using System.Collections.Generic; -using System.Text; using System.Drawing; +using System.Drawing.Imaging; +using System.IO; using libTerrain; using OpenJPEGNet; @@ -421,9 +422,9 @@ namespace OpenSim.Region.Terrain /// The filename of the double array to import public void loadFromFileF64(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read); - System.IO.BinaryReader bs = new System.IO.BinaryReader(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.Open, FileAccess.Read); + BinaryReader bs = new BinaryReader(s); int x, y; for (x = 0; x < w; x++) { @@ -446,9 +447,9 @@ namespace OpenSim.Region.Terrain /// The filename of the float array to import public void loadFromFileF32(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read); - System.IO.BinaryReader bs = new System.IO.BinaryReader(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.Open, FileAccess.Read); + BinaryReader bs = new BinaryReader(s); int x, y; for (x = 0; x < w; x++) { @@ -471,9 +472,9 @@ namespace OpenSim.Region.Terrain /// A path to the .RAW format public void loadFromFileSLRAW(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read); - System.IO.BinaryReader bs = new System.IO.BinaryReader(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.Open, FileAccess.Read); + BinaryReader bs = new BinaryReader(s); int x, y; for (x = 0; x < w; x++) { @@ -496,9 +497,9 @@ namespace OpenSim.Region.Terrain /// The desired output filename public void writeToFileF64(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write); - System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); + BinaryWriter bs = new BinaryWriter(s); int x, y; for (x = 0; x < w; x++) @@ -519,9 +520,9 @@ namespace OpenSim.Region.Terrain /// The desired output filename public void writeToFileF32(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write); - System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); + BinaryWriter bs = new BinaryWriter(s); int x, y; for (x = 0; x < w; x++) @@ -543,9 +544,9 @@ namespace OpenSim.Region.Terrain /// Filename to write to public void writeToFileRAW(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write); - System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); + BinaryWriter bs = new BinaryWriter(s); int x, y; @@ -608,9 +609,9 @@ namespace OpenSim.Region.Terrain /// The filename to output to public void writeToFileHiRAW(string filename) { - System.IO.FileInfo file = new System.IO.FileInfo(filename); - System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write); - System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s); + FileInfo file = new FileInfo(filename); + FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); + BinaryWriter bs = new BinaryWriter(s); // Generate a smegging big lookup table to speed the operation up (it needs it) double[] lookupTable = new double[65536]; @@ -872,7 +873,7 @@ namespace OpenSim.Region.Terrain } } - bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png); + bmp.Save(filename, ImageFormat.Png); } catch (Exception e) { @@ -913,7 +914,7 @@ namespace OpenSim.Region.Terrain } //bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png); - imageData = OpenJPEGNet.OpenJPEG.EncodeFromImage(bmp, "map"); + imageData = OpenJPEG.EncodeFromImage(bmp, "map"); } catch (Exception e) diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs index e0ae586..feb9327 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs @@ -26,16 +26,12 @@ * */ using System; -using System.Collections.Generic; -using System.Text; - using System.CodeDom.Compiler; -using System.CodeDom; +using System.Collections.Generic; +using libTerrain; using Microsoft.CSharp; using Microsoft.JScript; -using libTerrain; - namespace OpenSim.Region.Terrain { public interface ITerrainFilter -- cgit v1.1