From fef3b3689492dea63693c964bcdbec9f5137eb5e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 21 Apr 2008 07:09:17 +0000 Subject: * Optimised using statements and namespace references across entire project (this took a while to run). --- OpenSim/Region/Application/Application.cs | 4 +- OpenSim/Region/Application/OpenSimMain.cs | 17 +- OpenSim/Region/ClientStack/ClientView.cs | 9 +- OpenSim/Region/ClientStack/PacketServer.cs | 1 - .../Region/ClientStack/RegionApplicationBase.cs | 7 +- OpenSim/Region/ClientStack/UDPServer.cs | 6 +- .../Communications/Local/LocalBackEndServices.cs | 10 +- .../Communications/Local/LocalInventoryService.cs | 6 +- .../Communications/Local/LocalLoginService.cs | 11 +- .../Communications/Local/LocalUserServices.cs | 1 - .../Region/Communications/OGS1/OGS1GridServices.cs | 8 +- .../Communications/OGS1/OGS1InterSimComms.cs | 4 +- .../Communications/OGS1/OGS1InventoryService.cs | 18 +- .../Region/Communications/OGS1/OGS1UserServices.cs | 7 +- OpenSim/Region/DataSnapshot/DataRequestHandler.cs | 9 +- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 24 +-- OpenSim/Region/DataSnapshot/EstateSnapshot.cs | 9 +- .../Interfaces/IDataSnapshotProvider.cs | 4 - OpenSim/Region/DataSnapshot/LandSnapshot.cs | 18 +- OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 10 +- OpenSim/Region/Environment/EstateManager.cs | 6 +- OpenSim/Region/Environment/Interfaces/ICommand.cs | 6 +- .../Environment/Interfaces/ICommandableModule.cs | 6 - .../Region/Environment/Interfaces/ICommander.cs | 4 - .../Region/Environment/Interfaces/ILandChannel.cs | 5 +- .../Region/Environment/Interfaces/ILandObject.cs | 6 +- .../Environment/Interfaces/ITextureSender.cs | 2 - OpenSim/Region/Environment/Interfaces/IXMLRPC.cs | 2 - OpenSim/Region/Environment/ModuleLoader.cs | 4 +- .../Modules/AgentAssetTransactionModule.cs | 6 +- .../Environment/Modules/AssetDownloadModule.cs | 2 - .../Environment/Modules/AsteriskVoiceModule.cs | 9 +- .../Environment/Modules/AvatarProfilesModule.cs | 9 +- .../Environment/Modules/BetaGridLikeMoneyModule.cs | 17 +- OpenSim/Region/Environment/Modules/ChatModule.cs | 14 +- .../Environment/Modules/CommanderTestModule.cs | 5 +- .../Environment/Modules/DynamicTextureModule.cs | 7 +- .../ExportSerialiser/ExportSerialisationModule.cs | 9 +- .../Modules/ExportSerialiser/IFileSerialiser.cs | 4 - .../Modules/ExportSerialiser/IRegionSerialiser.cs | 6 +- .../Modules/ExportSerialiser/SerialiseObjects.cs | 7 +- .../Modules/ExportSerialiser/SerialiseTerrain.cs | 3 +- .../Region/Environment/Modules/FriendsModule.cs | 4 +- OpenSim/Region/Environment/Modules/GroupsModule.cs | 4 +- .../Region/Environment/Modules/InventoryModule.cs | 9 +- .../Modules/LandManagement/LandChannel.cs | 14 +- .../Modules/LandManagement/LandManagementModule.cs | 12 +- .../Modules/LandManagement/LandObject.cs | 9 +- .../Modules/ModuleFramework/Commander.cs | 14 +- .../Environment/Modules/ScriptsHttpRequests.cs | 3 +- .../Environment/Modules/TextureDownloadModule.cs | 2 +- .../Region/Environment/Modules/TextureSender.cs | 8 +- .../Environment/Modules/TreePopulatorModule.cs | 15 +- .../Modules/UserTextureDownloadService.cs | 11 +- .../Environment/Modules/VectorRenderModule.cs | 20 ++- OpenSim/Region/Environment/Modules/VoiceModule.cs | 9 +- .../Region/Environment/Modules/WorldCommModule.cs | 1 - OpenSim/Region/Environment/Modules/XMLRPCModule.cs | 15 +- OpenSim/Region/Environment/PermissionManager.cs | 3 +- .../Region/Environment/Scenes/AvatarAnimations.cs | 2 - .../Region/Environment/Scenes/AvatarAppearance.cs | 8 +- OpenSim/Region/Environment/Scenes/EntityBase.cs | 10 +- OpenSim/Region/Environment/Scenes/InnerScene.cs | 7 +- .../Region/Environment/Scenes/Scene.Inventory.cs | 16 +- .../Environment/Scenes/Scene.PacketHandlers.cs | 2 - OpenSim/Region/Environment/Scenes/Scene.cs | 27 +-- OpenSim/Region/Environment/Scenes/SceneBase.cs | 8 +- .../Scenes/SceneCommunicationService.cs | 7 +- OpenSim/Region/Environment/Scenes/SceneEvents.cs | 8 +- OpenSim/Region/Environment/Scenes/SceneManager.cs | 6 +- .../Scenes/SceneObjectGroup.Inventory.cs | 8 +- .../Region/Environment/Scenes/SceneObjectGroup.cs | 2 - .../Scenes/SceneObjectPart.Inventory.cs | 8 +- .../Region/Environment/Scenes/SceneObjectPart.cs | 12 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 20 +-- .../Scenes/Scripting/ScriptEngineInterface.cs | 2 - .../Scenes/Scripting/ScriptEngineLoader.cs | 4 +- OpenSim/Region/Environment/StorageManager.cs | 4 +- .../Region/Environment/Types/BasicQuadTreeNode.cs | 3 +- OpenSim/Region/Environment/Types/UpdateQueue.cs | 11 +- .../SimpleModule/Properties/AssemblyInfo.cs | 1 - .../Region/Examples/SimpleModule/RegionModule.cs | 2 - .../Engines/CSharp/CSharpScriptEngine.cs | 5 +- .../Engines/JScript/JScriptEngine.cs | 5 +- .../Engines/JVMEngine/JVM/Interpreter.Methods.cs | 6 +- .../Region/ExtensionsScriptModule/ScriptInfo.cs | 7 +- .../ExtensionsScriptModule/ScriptInterpretedAPI.cs | 5 +- .../Region/ExtensionsScriptModule/ScriptManager.cs | 5 +- .../Modules/AvatarFactory/AppearanceTableMapper.cs | 63 ++++--- .../Modules/AvatarFactory/AvatarFactoryModule.cs | 4 +- .../AvatarFactory/Properties/AssemblyInfo.cs | 1 - .../SvnSerialiser/Properties/AssemblyInfo.cs | 1 - .../Modules/SvnSerialiser/SvnBackupModule.cs | 35 ++-- .../Region/Physics/BulletXPlugin/BulletXPlugin.cs | 2 - OpenSim/Region/Physics/Manager/CollisionLocker.cs | 1 - .../Region/Physics/Manager/PhysicsPluginManager.cs | 4 +- OpenSim/Region/Physics/Manager/PhysicsScene.cs | 6 +- OpenSim/Region/Physics/Manager/PhysicsSensor.cs | 3 - OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 1 - OpenSim/Region/Physics/Meshing/SimpleHull.cs | 1 - OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 6 +- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 21 ++- OpenSim/Region/Physics/OdePlugin/ODETestClass.cs | 7 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 16 +- .../Region/ScriptEngine/Common/BuilIn_Commands.cs | 3 - .../Common/BuiltIn_Commands_BaseClass.cs | 183 ++++++++++----------- OpenSim/Region/ScriptEngine/Common/Executor.cs | 1 - OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs | 2 - .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 33 ++-- .../Common/LSL_BuiltIn_Commands_Interface.cs | 4 +- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 26 +-- .../ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 18 +- .../Common/OSSL_BuilIn_Commands_Interface.cs | 4 - .../Common/ScriptEngineBase/AppDomainManager.cs | 1 - .../Common/ScriptEngineBase/AsyncCommandManager.cs | 19 +-- .../AsyncCommandPlugins/HttpRequest.cs | 8 - .../AsyncCommandPlugins/Listener.cs | 8 - .../AsyncCommandPlugins/SensorRepeat.cs | 7 +- .../ScriptEngineBase/AsyncCommandPlugins/Timer.cs | 6 - .../AsyncCommandPlugins/XmlRequest.cs | 7 - .../Common/ScriptEngineBase/EventManager.cs | 2 +- .../Common/ScriptEngineBase/EventQueueManager.cs | 3 - .../ScriptEngineBase/EventQueueThreadClass.cs | 5 +- .../Common/ScriptEngineBase/MaintenanceThread.cs | 7 +- .../Common/ScriptEngineBase/ScriptEngine.cs | 12 +- .../Common/ScriptEngineBase/ScriptManager.cs | 6 +- .../iScriptEngineFunctionModule.cs | 4 - .../ScriptEngine/Common/ScriptServerInterfaces.cs | 1 - OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs | 4 - .../Region/ScriptEngine/Common/TRPC/TCPClient.cs | 2 - .../Region/ScriptEngine/Common/TRPC/TCPCommon.cs | 6 +- .../Region/ScriptEngine/Common/TRPC/TCPServer.cs | 1 - OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | 32 ++-- .../DotNetEngine/Compiler/LSL/Compiler.cs | 10 +- .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 22 +-- .../ScriptEngine/DotNetEngine/ScriptEngine.cs | 5 +- .../ScriptEngine/DotNetEngine/ScriptManager.cs | 2 +- .../Region/ScriptEngine/LSOEngine/LSO/Engine.cs | 25 ++- .../LSOEngine/LSO/IL_common_functions.cs | 4 - .../LSOEngine/LSO/LSL_BaseClass_OPCODES.cs | 3 - .../ScriptEngine/LSOEngine/LSO/LSO_Parser.cs | 1 - OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs | 4 - .../Region/ScriptEngine/LSOEngine/ScriptEngine.cs | 10 +- .../Region/ScriptEngine/LSOEngine/ScriptManager.cs | 7 +- .../ScriptEngine/RemoteServer/RemoteServer.cs | 13 +- .../ScriptEngine/RemoteServer/ScriptEngine.cs | 7 +- .../OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | 7 +- .../libTerrainBSD/Channel/Editing/Flatten.cs | 2 - 148 files changed, 619 insertions(+), 776 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index ae299a4..eaa4788 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -26,7 +26,7 @@ */ using System; -using System.Net; +using log4net.Config; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; @@ -44,7 +44,7 @@ namespace OpenSim // First line AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 14cbe13..aa08f81 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -29,10 +29,13 @@ using System; using System.Collections; using System.Collections.Generic; using System.IO; +using System.Net; +using System.Reflection; using System.Text; using System.Threading; using System.Timers; using libsecondlife; +using log4net; using Mono.Addins; using Nini.Config; using OpenSim.Framework; @@ -47,7 +50,7 @@ using OpenSim.Region.Environment; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Physics.Manager; -using Timer = System.Timers.Timer; +using Timer=System.Timers.Timer; namespace OpenSim { @@ -55,7 +58,7 @@ namespace OpenSim public class OpenSimMain : RegionApplicationBase, conscmd_callback { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string proxyUrl; private int proxyOffset = 0; @@ -757,7 +760,7 @@ namespace OpenSim } else { - m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); + m_sceneManager.CurrentScene.SetSceneCoreDebug(!Convert.ToBoolean(cmdparams[0]), !Convert.ToBoolean(cmdparams[1]), !Convert.ToBoolean(cmdparams[2])); } } else @@ -813,7 +816,7 @@ namespace OpenSim // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); // } - List threads = OpenSim.Framework.ThreadTracker.GetThreads(); + List threads = ThreadTracker.GetThreads(); if (threads == null) { m_console.Notice("THREAD", "Thread tracking is only enabled in DEBUG mode."); @@ -1056,7 +1059,7 @@ namespace OpenSim case "unload": if (cmdparams.Length > 1) { - foreach (IRegionModule rm in new System.Collections.ArrayList(m_moduleLoader.GetLoadedSharedModules)) + foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules)) { if (rm.Name.ToLower() == cmdparams[1].ToLower()) { @@ -1069,7 +1072,7 @@ namespace OpenSim case "load": if (cmdparams.Length > 1) { - foreach (Scene s in new System.Collections.ArrayList(m_sceneManager.Scenes)) + foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) { m_console.Notice("Loading module: " + cmdparams[1]); @@ -1142,7 +1145,7 @@ namespace OpenSim { RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); string regionName; - System.Net.EndPoint ep = null; + EndPoint ep = null; if (regionInfo == null) { diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 292f7f6..7ff1f23 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -29,17 +29,18 @@ using System; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using System.Text; using System.Threading; using System.Timers; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; -using Timer = System.Timers.Timer; +using Timer=System.Timers.Timer; namespace OpenSim.Region.ClientStack { @@ -51,7 +52,7 @@ namespace OpenSim.Region.ClientStack /// public class ClientView : IClientAPI { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // ~ClientView() // { @@ -341,7 +342,7 @@ namespace OpenSim.Region.ClientStack m_clientThread.Name = "ClientThread"; m_clientThread.IsBackground = true; m_clientThread.Start(); - OpenSim.Framework.ThreadTracker.Add(m_clientThread); + ThreadTracker.Add(m_clientThread); } public void SetDebug(int newDebug) diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs index 485c013..f9e3dc8 100644 --- a/OpenSim/Region/ClientStack/PacketServer.cs +++ b/OpenSim/Region/ClientStack/PacketServer.cs @@ -25,7 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Net; using System.Net.Sockets; using libsecondlife; diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 2b023a6..bc0bea3 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -25,10 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.Net; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; @@ -42,8 +43,8 @@ namespace OpenSim.Region.ClientStack { public abstract class RegionApplicationBase : BaseOpenSimServer { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected AssetCache m_assetCache; protected Dictionary m_clientCircuits = new Dictionary(); diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 7a4cc97..7c4c03c 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs @@ -26,20 +26,20 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; namespace OpenSim.Region.ClientStack { public class UDPServer : ClientStackNetworkHandler { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Dictionary clientCircuits = new Dictionary(); public Dictionary clientCircuits_reverse = new Dictionary(); diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index f5a5e83..2960a62 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -25,18 +25,20 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; namespace OpenSim.Region.Communications.Local { public class LocalBackEndServices : IGridServices, IInterRegionCommunications { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Dictionary m_regions = new Dictionary(); @@ -47,7 +49,7 @@ namespace OpenSim.Region.Communications.Local private Dictionary m_queuedGridSettings = new Dictionary(); - public string _gdebugRegionName = System.String.Empty; + public string _gdebugRegionName = String.Empty; bool m_bAvailable=true; @@ -67,7 +69,7 @@ namespace OpenSim.Region.Communications.Local set { _gdebugRegionName = value; } } - public string _rdebugRegionName = System.String.Empty; + public string _rdebugRegionName = String.Empty; public string rdebugRegionName { diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index dafd637..a567eeb 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -26,7 +26,9 @@ */ using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; @@ -39,8 +41,8 @@ namespace OpenSim.Region.Communications.Local /// public class LocalInventoryService : InventoryServiceBase { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) { diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 79bf9e5..c4823f4 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -28,14 +28,11 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using libsecondlife; - +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; -using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; -using InventoryFolder=OpenSim.Framework.InventoryFolder; namespace OpenSim.Region.Communications.Local { @@ -43,8 +40,8 @@ namespace OpenSim.Region.Communications.Local public class LocalLoginService : LoginService { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private CommunicationsLocal m_Parent; diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index c543762..29de8fd 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -29,7 +29,6 @@ using System; using libsecondlife; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; namespace OpenSim.Region.Communications.Local diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 1135ddd..eada868 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -30,15 +30,17 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; using System.Security.Authentication; +using System.Threading; using libsecondlife; +using log4net; using Nwc.XmlRpc; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Region.Communications.Local; @@ -46,7 +48,7 @@ namespace OpenSim.Region.Communications.OGS1 { public class OGS1GridServices : IGridServices, IInterRegionCommunications { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private LocalBackEndServices m_localBackend = new LocalBackEndServices(); private Dictionary m_remoteRegionInfoCache = new Dictionary(); @@ -1461,7 +1463,7 @@ namespace OpenSim.Region.Communications.OGS1 Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket); ar.AsyncWaitHandle.WaitOne(timeOut*1000, false); - System.Threading.Thread.Sleep(500); + Thread.Sleep(500); } public bool Available diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 2e106d7..8285fb1 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs @@ -26,8 +26,10 @@ */ using System; +using System.Reflection; using System.Runtime.Remoting; using libsecondlife; +using log4net; using OpenSim.Framework; namespace OpenSim.Region.Communications.OGS1 @@ -153,7 +155,7 @@ namespace OpenSim.Region.Communications.OGS1 public class OGS1InterRegionRemoting : MarshalByRefObject { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public OGS1InterRegionRemoting() { diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index fbe905c..e0167a7 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -27,19 +27,21 @@ using System; using System.Collections.Generic; +using System.Net; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; namespace OpenSim.Region.Communications.OGS1 { public class OGS1InventoryService : IInventoryServices { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string _inventoryServerUrl; private Dictionary m_RequestingInventory = new Dictionary(); @@ -71,7 +73,7 @@ namespace OpenSim.Region.Communications.OGS1 requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.UUID); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", e.Source, e.Message); @@ -153,7 +155,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/NewFolder/", folder); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", e.Source, e.Message); @@ -167,7 +169,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/MoveFolder/", folder); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", e.Source, e.Message); @@ -181,7 +183,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/NewItem/", item); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", e.Source, e.Message); @@ -195,7 +197,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/DeleteItem/", item); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", e.Source, e.Message); diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index c140213..56b0e8c 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -29,17 +29,18 @@ using System; using System.Collections; using System.Collections.Generic; using System.Net; +using System.Reflection; using System.Text.RegularExpressions; using libsecondlife; +using log4net; using Nwc.XmlRpc; using OpenSim.Framework; -using OpenSim.Framework.Console; namespace OpenSim.Region.Communications.OGS1 { public class OGS1UserServices : IUserService { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private CommunicationsOGS1 m_parent; @@ -158,7 +159,7 @@ namespace OpenSim.Region.Communications.OGS1 { XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); } - catch (System.Net.WebException) + catch (WebException) { m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); } diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs index a59d86a..7e096df 100644 --- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs +++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs @@ -26,14 +26,11 @@ * */ -using System; -using System.Collections.Generic; using System.Collections; -using System.Text; +using System.Reflection; using System.Xml; +using log4net; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Console; namespace OpenSim.Region.DataSnapshot { @@ -41,7 +38,7 @@ namespace OpenSim.Region.DataSnapshot { private Scene m_scene = null; private DataSnapshotManager m_externalData = null; - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public DataRequestHandler(Scene scene, DataSnapshotManager externalData) { diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index cb9ce44..682763b 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -28,18 +28,18 @@ using System; using System.Collections.Generic; -using System.Reflection; -using System.Xml; using System.IO; +using System.Net; +using System.Reflection; using System.Text; using System.Timers; -using OpenSim.Framework; +using System.Xml; +using libsecondlife; +using log4net; +using Nini.Config; using OpenSim.Framework.Communications; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; -using libsecondlife; -using libsecondlife.Packets; namespace OpenSim.Region.DataSnapshot { @@ -47,13 +47,13 @@ namespace OpenSim.Region.DataSnapshot { #region Class members private List m_scenes = new List(); - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private bool m_enabled = false; private bool m_configLoaded = false; internal object m_syncInit = new object(); private DataRequestHandler m_requests = null; private Dictionary> m_dataproviders = new Dictionary>(); - private Dictionary m_gridinfo = new Dictionary(); + private Dictionary m_gridinfo = new Dictionary(); //private int m_oldestSnapshot = 0; private int m_maxSnapshots = 500; private int m_lastSnapshot = 0; @@ -63,7 +63,7 @@ namespace OpenSim.Region.DataSnapshot private string m_hostname = "127.0.0.1"; private Timer m_periodic = null; private int m_period = 60; // in seconds - private List m_disabledModules = new List(); + private List m_disabledModules = new List(); #endregion #region IRegionModule @@ -72,7 +72,7 @@ namespace OpenSim.Region.DataSnapshot } - public void Initialise(Scene scene, Nini.Config.IConfigSource config) + public void Initialise(Scene scene, IConfigSource config) { if (!m_scenes.Contains(scene)) m_scenes.Add(scene); @@ -495,7 +495,7 @@ namespace OpenSim.Region.DataSnapshot { reply = cli.Request(); } - catch (System.Net.WebException) + catch (WebException) { m_log.Warn("[DATASNAPSHOT] Unable to notify " + url); } @@ -514,7 +514,7 @@ namespace OpenSim.Region.DataSnapshot m_log.Warn("[DATASNAPSHOT] Unable to decode reply from data service. Ignoring. " + e.StackTrace); } // This is not quite working, so... - string responseStr = System.Text.ASCIIEncoding.UTF8.GetString(response); + string responseStr = ASCIIEncoding.UTF8.GetString(response); m_log.Info("[DATASNAPSHOT] data service notified: " + url); } diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs index b517c16..20ba27c 100644 --- a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs @@ -26,16 +26,9 @@ */ using System; -using System.Collections.Generic; -using System.Text; using System.Xml; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Modules.LandManagement; -using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; using libsecondlife; -using libsecondlife.Packets; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.DataSnapshot { diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs index 26124ce..8f580fc 100644 --- a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs +++ b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs @@ -26,12 +26,8 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; using System.Xml; using OpenSim.Region.Environment.Scenes; -using libsecondlife; namespace OpenSim.Region.DataSnapshot { diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index a82f4be..4c17513 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs @@ -28,18 +28,14 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Xml; using System.Reflection; - -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Modules.LandManagement; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; +using System.Xml; using libsecondlife; -using libsecondlife.Packets; +using log4net; +using OpenSim.Framework; +using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Modules.LandManagement; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.DataSnapshot { @@ -48,7 +44,7 @@ namespace OpenSim.Region.DataSnapshot private Scene m_scene = null; private DataSnapshotManager m_parent = null; //private Dictionary m_landIndexed = new Dictionary(); - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); #region Dead code diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index 353a02b..d48ecfd 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs @@ -25,14 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; -using System.Xml; using System.Reflection; +using System.Xml; +using log4net; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using libsecondlife; namespace OpenSim.Region.DataSnapshot { @@ -40,7 +36,7 @@ namespace OpenSim.Region.DataSnapshot { private Scene m_scene = null; private DataSnapshotManager m_parent = null; - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public void Initialize(Scene scene, DataSnapshotManager parent) { diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index ba4f0c6..b3ffd10 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs @@ -27,11 +27,11 @@ using System; using System.Collections.Generic; -using System.Text; +using System.Reflection; using libsecondlife; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment @@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment /// public class EstateManager { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; private RegionInfo m_regInfo; diff --git a/OpenSim/Region/Environment/Interfaces/ICommand.cs b/OpenSim/Region/Environment/Interfaces/ICommand.cs index c119736..4eeb16c 100644 --- a/OpenSim/Region/Environment/Interfaces/ICommand.cs +++ b/OpenSim/Region/Environment/Interfaces/ICommand.cs @@ -25,16 +25,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; - -using OpenSim.Region.Environment.Modules.ModuleFramework; +using System.Collections.Generic; namespace OpenSim.Region.Environment.Interfaces { public interface ICommand { void AddArgument(string name, string helptext, string type); - System.Collections.Generic.Dictionary Arguments { get; } + Dictionary Arguments { get; } string Help { get; } string Name { get; } void Run(object[] args); diff --git a/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs b/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs index 067c43a..c4ed942 100644 --- a/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs +++ b/OpenSim/Region/Environment/Interfaces/ICommandableModule.cs @@ -25,12 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; - -using OpenSim.Region.Environment.Modules.ModuleFramework; - namespace OpenSim.Region.Environment.Interfaces { public interface ICommandableModule diff --git a/OpenSim/Region/Environment/Interfaces/ICommander.cs b/OpenSim/Region/Environment/Interfaces/ICommander.cs index 7cc6ffb..c4102af 100644 --- a/OpenSim/Region/Environment/Interfaces/ICommander.cs +++ b/OpenSim/Region/Environment/Interfaces/ICommander.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; - -using OpenSim.Region.Environment.Modules.ModuleFramework; - namespace OpenSim.Region.Environment.Interfaces { public interface ICommander diff --git a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs b/OpenSim/Region/Environment/Interfaces/ILandChannel.cs index 98bab63..464a213 100644 --- a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Environment/Interfaces/ILandChannel.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 libsecondlife; using libsecondlife.Packets; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Interfaces { diff --git a/OpenSim/Region/Environment/Interfaces/ILandObject.cs b/OpenSim/Region/Environment/Interfaces/ILandObject.cs index 33ccddc..420ffc3 100644 --- a/OpenSim/Region/Environment/Interfaces/ILandObject.cs +++ b/OpenSim/Region/Environment/Interfaces/ILandObject.cs @@ -25,15 +25,11 @@ * 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.Region.Environment.Scenes; - using OpenSim.Framework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Interfaces { diff --git a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs index f262b9a..1b9e4eb 100644 --- a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs +++ b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; - namespace OpenSim.Region.Environment.Interfaces { /// diff --git a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs index 358b56f..c7f1001 100644 --- a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs +++ b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs @@ -27,8 +27,6 @@ using libsecondlife; using OpenSim.Region.Environment.Modules; -using System.Collections; -using System.Collections.Generic; namespace OpenSim.Region.Environment.Interfaces { diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index 7fb8d8a..43ca7bd 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs @@ -29,8 +29,8 @@ using System; using System.Collections.Generic; using System.IO; using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; using OpenSim.Region.Environment.Scenes; @@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment { public class ModuleLoader { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public Dictionary LoadedAssemblys = new Dictionary(); diff --git a/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs index 7ae3eba..cec7192 100644 --- a/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs @@ -27,7 +27,9 @@ using System; using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -129,8 +131,8 @@ namespace OpenSim.Region.Environment.Modules //should merge this classes and clean up public class AgentAssetTransactionsManager { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // Fields public Scene MyScene; diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs index d5f1b36..97db31e 100644 --- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; -using System.Threading; using libsecondlife; using libsecondlife.Packets; using Nini.Config; diff --git a/OpenSim/Region/Environment/Modules/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/AsteriskVoiceModule.cs index 52b9c3e..1b537c2 100644 --- a/OpenSim/Region/Environment/Modules/AsteriskVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/AsteriskVoiceModule.cs @@ -27,24 +27,25 @@ using System; using System.Collections; -using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using Nini.Config; using Nwc.XmlRpc; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Region.Capabilities; -using Caps = OpenSim.Region.Capabilities.Caps; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; +using Caps=OpenSim.Region.Capabilities.Caps; namespace OpenSim.Region.Environment.Modules { public class AsteriskVoiceModule : IRegionModule { - private static readonly log4net.ILog m_log = - log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = + LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; private IConfig m_config; diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs index e3ad297..44b3f8b 100644 --- a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs @@ -25,7 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; +using System.Reflection; using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -35,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules { public class AvatarProfilesModule : IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; public AvatarProfilesModule() @@ -92,8 +95,8 @@ namespace OpenSim.Region.Environment.Modules { remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, Util.ToDateTime(profile.Created).ToString(), - System.String.Empty, profile.FirstLifeAboutText, profile.CanDoMask, - profile.FirstLifeImage, profile.Image, System.String.Empty, partner); + String.Empty, profile.FirstLifeAboutText, profile.CanDoMask, + profile.FirstLifeImage, profile.Image, String.Empty, partner); } else { diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index 0748719..d5b2ea2 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs @@ -30,16 +30,15 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using System.Xml; using libsecondlife; +using log4net; using Nini.Config; +using Nwc.XmlRpc; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nwc.XmlRpc; - -using MoneyTransferArgs = OpenSim.Region.Environment.Scenes.EventManager.MoneyTransferArgs; -using LandBuyArgs = OpenSim.Region.Environment.Scenes.EventManager.LandBuyArgs; namespace OpenSim.Region.Environment.Modules { @@ -56,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules /// public class BetaGridLikeMoneyModule: IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Region UUIDS indexed by AgentID @@ -341,7 +340,7 @@ namespace OpenSim.Region.Environment.Modules } } - private void ValidateLandBuy (Object osender, LandBuyArgs e) + private void ValidateLandBuy (Object osender, EventManager.LandBuyArgs e) { if (m_MoneyAddress.Length == 0) { @@ -372,7 +371,7 @@ namespace OpenSim.Region.Environment.Modules } } - private void processLandBuy(Object osender, LandBuyArgs e) + private void processLandBuy(Object osender, EventManager.LandBuyArgs e) { lock(e) { @@ -396,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules /// /// /// - private void MoneyTransferAction (Object osender, MoneyTransferArgs e) + private void MoneyTransferAction (Object osender, EventManager.MoneyTransferArgs e) { IClientAPI sender = null; IClientAPI receiver = null; @@ -724,7 +723,7 @@ namespace OpenSim.Region.Environment.Modules { returnfunds = GetFundsForAgentID(agentID); } - catch (System.Exception e) + catch (Exception e) { client.SendAlertMessage(e.Message + " "); } diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index f854409..30c1397 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -29,9 +29,11 @@ using System; using System.Collections.Generic; using System.IO; using System.Net.Sockets; +using System.Reflection; using System.Text.RegularExpressions; using System.Threading; using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -41,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules { public class ChatModule : IRegionModule, ISimChat { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private List m_scenes = new List(); @@ -116,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules if (!m_irc_connector.IsAlive) { m_irc_connector.Start(); - OpenSim.Framework.ThreadTracker.Add(m_irc_connector); + ThreadTracker.Add(m_irc_connector); } } catch (Exception) @@ -267,7 +269,7 @@ namespace OpenSim.Region.Environment.Modules if (!m_irc_connector.IsAlive) { m_irc_connector.Start(); - OpenSim.Framework.ThreadTracker.Add(m_irc_connector); + ThreadTracker.Add(m_irc_connector); } } catch (Exception) @@ -336,7 +338,7 @@ namespace OpenSim.Region.Environment.Modules internal class IRCChatModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string m_server = null; private uint m_port = 6668; @@ -431,13 +433,13 @@ namespace OpenSim.Region.Environment.Modules pingSender.Name = "PingSenderThread"; pingSender.IsBackground = true; pingSender.Start(); - OpenSim.Framework.ThreadTracker.Add(pingSender); + ThreadTracker.Add(pingSender); listener = new Thread(new ThreadStart(ListenerRun)); listener.Name = "IRCChatModuleListenerThread"; listener.IsBackground = true; listener.Start(); - OpenSim.Framework.ThreadTracker.Add(listener); + ThreadTracker.Add(listener); m_writer.WriteLine(m_user); m_writer.Flush(); diff --git a/OpenSim/Region/Environment/Modules/CommanderTestModule.cs b/OpenSim/Region/Environment/Modules/CommanderTestModule.cs index 0133f27..a30de73 100644 --- a/OpenSim/Region/Environment/Modules/CommanderTestModule.cs +++ b/OpenSim/Region/Environment/Modules/CommanderTestModule.cs @@ -26,13 +26,10 @@ */ using System; -using System.Collections.Generic; -using libsecondlife; using Nini.Config; -using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Modules.ModuleFramework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules { diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs index ee84499..02354f1 100644 --- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs @@ -26,14 +26,15 @@ */ using System; -using System.Drawing; using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; using libsecondlife; using Nini.Config; +using OpenJPEGNet; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenJPEGNet; namespace OpenSim.Region.Environment.Modules { @@ -252,7 +253,7 @@ namespace OpenSim.Region.Environment.Modules Bitmap joint; Graphics jG; - joint = new Bitmap(back.Width, back.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); + joint = new Bitmap(back.Width, back.Height, PixelFormat.Format32bppArgb); jG = Graphics.FromImage(joint); jG.DrawImage(back, 0, 0, back.Width, back.Height); diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs index 0faa573..f811f22 100644 --- a/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs +++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs @@ -27,18 +27,15 @@ using System; using System.Collections.Generic; -using System.Drawing; -using libsecondlife; +using System.IO; using Nini.Config; -using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Modules.ModuleFramework; -using System.IO; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules.ExportSerialiser { - public class ExportSerialisationModule : IRegionModule, OpenSim.Region.Environment.Modules.ExportSerialiser.IRegionSerialiser + public class ExportSerialisationModule : IRegionModule, IRegionSerialiser { private List m_regions = new List(); private List m_serialisers = new List(); diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/IFileSerialiser.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/IFileSerialiser.cs index f13c8fa..8cd97a8 100644 --- a/OpenSim/Region/Environment/Modules/ExportSerialiser/IFileSerialiser.cs +++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/IFileSerialiser.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 OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules.ExportSerialiser diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/IRegionSerialiser.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/IRegionSerialiser.cs index a9454fc..5b10957 100644 --- a/OpenSim/Region/Environment/Modules/ExportSerialiser/IRegionSerialiser.cs +++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/IRegionSerialiser.cs @@ -25,11 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; +using System.Collections.Generic; +using OpenSim.Region.Environment.Scenes; + namespace OpenSim.Region.Environment.Modules.ExportSerialiser { public interface IRegionSerialiser { - System.Collections.Generic.List SerialiseRegion(OpenSim.Region.Environment.Scenes.Scene scene, string saveDir); + List SerialiseRegion(Scene scene, string saveDir); } } diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs index e413466..ac80f40 100644 --- a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs +++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs @@ -25,10 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenSim.Region.Environment.Scenes; -using System.IO; using System.Collections.Generic; +using System.IO; +using System.Text; using System.Xml; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules.ExportSerialiser { @@ -61,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser xmlstream += ""; MemoryStream stream = new MemoryStream(); - XmlTextWriter formatter = new XmlTextWriter(stream, System.Text.Encoding.UTF8); + XmlTextWriter formatter = new XmlTextWriter(stream, Encoding.UTF8); XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlstream); diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs index eeeacdc..8555089 100644 --- a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs +++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs @@ -26,6 +26,7 @@ */ using OpenSim.Region.Environment.Modules.Terrain; +using OpenSim.Region.Environment.Modules.Terrain.FileLoaders; using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules.ExportSerialiser @@ -36,7 +37,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser public string WriteToFile(Scene scene, string dir) { - ITerrainLoader fileSystemExporter = new Terrain.FileLoaders.RAW32(); + ITerrainLoader fileSystemExporter = new RAW32(); string targetFileName = dir + "heightmap.r32"; lock (scene.Heightmap) diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index a2ec599..7e12618 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs @@ -26,8 +26,10 @@ */ using System; using System.Collections.Generic; +using System.Reflection; using libsecondlife; using libsecondlife.Packets; +using log4net; using Nini.Config; using Nwc.XmlRpc; using OpenSim.Framework; @@ -38,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules { public class FriendsModule : IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private List m_scene = new List(); diff --git a/OpenSim/Region/Environment/Modules/GroupsModule.cs b/OpenSim/Region/Environment/Modules/GroupsModule.cs index 6cdae7b..b23bb91 100644 --- a/OpenSim/Region/Environment/Modules/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/GroupsModule.cs @@ -27,7 +27,9 @@ using System; using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -37,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules { public class GroupsModule : IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private List m_scene = new List(); private Dictionary m_iclientmap = new Dictionary(); diff --git a/OpenSim/Region/Environment/Modules/InventoryModule.cs b/OpenSim/Region/Environment/Modules/InventoryModule.cs index eadbb4f..ff5a02c 100644 --- a/OpenSim/Region/Environment/Modules/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/InventoryModule.cs @@ -25,12 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; - +using System.Reflection; using libsecondlife; +using log4net; using Nini.Config; - using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -39,8 +38,8 @@ namespace OpenSim.Region.Environment.Modules { public class InventoryModule : IRegionModule { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs index e3b7cf5..561c5cf 100644 --- a/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandChannel.cs @@ -27,18 +27,14 @@ using System; using System.Collections.Generic; -using System.Text; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Physics.Manager; -using LandBuyArgs = OpenSim.Region.Environment.Scenes.EventManager.LandBuyArgs; - namespace OpenSim.Region.Environment.Modules.LandManagement { public class LandChannel : ILandChannel @@ -245,7 +241,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / Convert.ToDouble(4.0))); y = Convert.ToInt32(Math.Floor(Convert.ToDouble(y_float) / Convert.ToDouble(4.0))); } - catch (System.OverflowException) + catch (OverflowException) { return null; } @@ -957,7 +953,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement // and land has been validated as well, this method transfers // the land ownership - public void handleLandBuyRequest(Object o, LandBuyArgs e) + public void handleLandBuyRequest(Object o, EventManager.LandBuyArgs e) { if (e.economyValidated && e.landValidated) { @@ -976,7 +972,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement // be validated. This method validates the right to buy the // parcel - public void handleLandValidationRequest(Object o, LandBuyArgs e) + public void handleLandValidationRequest(Object o, EventManager.LandBuyArgs e) { if (e.landValidated == false) { @@ -994,7 +990,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement int saleprice = lob.landData.salePrice; LLUUID pOwnerID = lob.landData.ownerID; - bool landforsale = ((lob.landData.landFlags & (uint)(libsecondlife.Parcel.ParcelFlags.ForSale | libsecondlife.Parcel.ParcelFlags.ForSaleObjects | libsecondlife.Parcel.ParcelFlags.SellParcelObjects)) != 0); + bool landforsale = ((lob.landData.landFlags & (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) { lock (e) diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs index 20f75df..1c36c0c 100644 --- a/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs @@ -25,17 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Interfaces; using Nini.Config; - -using LandBuyArgs = OpenSim.Region.Environment.Scenes.EventManager.LandBuyArgs; +using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules.LandManagement { diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs index 69d3c05..f9684e6 100644 --- a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs @@ -27,12 +27,13 @@ using System; using System.Collections.Generic; +using System.Reflection; using libsecondlife; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules.LandManagement { @@ -46,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement { #region Member Variables - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected LandData m_landData = new LandData(); protected List primsOverMe = new List(); @@ -273,7 +274,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement newData.claimPrice = claimprice; newData.salePrice = 0; newData.authBuyerID = LLUUID.Zero; - newData.landFlags &= ~(uint)(libsecondlife.Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); + newData.landFlags &= ~(uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); m_scene.LandChannel.updateLandObject(landData.localID, newData); sendLandUpdateToAvatarsOverMe(); diff --git a/OpenSim/Region/Environment/Modules/ModuleFramework/Commander.cs b/OpenSim/Region/Environment/Modules/ModuleFramework/Commander.cs index 9834a8a..27d73b5 100644 --- a/OpenSim/Region/Environment/Modules/ModuleFramework/Commander.cs +++ b/OpenSim/Region/Environment/Modules/ModuleFramework/Commander.cs @@ -27,8 +27,10 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Text; - +using log4net; +using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Modules.ModuleFramework @@ -39,9 +41,9 @@ namespace OpenSim.Region.Environment.Modules.ModuleFramework /// public class Command : ICommand { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private Action m_command; + private Action m_command; private string m_name; private string m_help; private List m_args = new List(); @@ -197,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.ModuleFramework /// public class Commander : ICommander { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Dictionary m_commands = new Dictionary(); private string m_name; @@ -241,7 +243,7 @@ namespace OpenSim.Region.Environment.Modules.ModuleFramework classSrc += "\tpublic void " + EscapeRuntimeAPICommand(com.Name) + "( "; foreach (KeyValuePair arg in com.Arguments) { - classSrc += arg.Value + " " + Framework.Util.Md5Hash(arg.Key) + ","; + classSrc += arg.Value + " " + Util.Md5Hash(arg.Key) + ","; } classSrc = classSrc.Remove(classSrc.Length - 1); // Delete the last comma classSrc += " )\n\t{\n"; @@ -249,7 +251,7 @@ namespace OpenSim.Region.Environment.Modules.ModuleFramework int i = 0; foreach (KeyValuePair arg in com.Arguments) { - classSrc += "\t\targs[" + i.ToString() + "] = " + Framework.Util.Md5Hash(arg.Key) + " " + ";\n"; + classSrc += "\t\targs[" + i.ToString() + "] = " + Util.Md5Hash(arg.Key) + " " + ";\n"; i++; } classSrc += "\t\tGetCommander(\"" + m_name + "\").Run(\"" + com.Name + "\", args);\n"; diff --git a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs index 10e3840..2de5975 100644 --- a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs @@ -33,6 +33,7 @@ using System.Text; using System.Threading; using libsecondlife; using Nini.Config; +using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -289,7 +290,7 @@ namespace OpenSim.Region.Environment.Modules httpThread.IsBackground = true; finished = false; httpThread.Start(); - OpenSim.Framework.ThreadTracker.Add(httpThread); + ThreadTracker.Add(httpThread); } /* diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index 1d32c1f..bde0dc0 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules m_thread.Name = "ProcessTextureSenderThread"; m_thread.IsBackground = true; m_thread.Start(); - OpenSim.Framework.ThreadTracker.Add(m_thread); + ThreadTracker.Add(m_thread); } if (!m_scenes.Contains(scene)) diff --git a/OpenSim/Region/Environment/Modules/TextureSender.cs b/OpenSim/Region/Environment/Modules/TextureSender.cs index 1500bdb..e54a1a2 100644 --- a/OpenSim/Region/Environment/Modules/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/TextureSender.cs @@ -26,10 +26,10 @@ */ using System; -using libsecondlife; +using System.Reflection; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Modules @@ -40,8 +40,8 @@ namespace OpenSim.Region.Environment.Modules /// public class TextureSender : ITextureSender { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Records the number of times texture send has been called. diff --git a/OpenSim/Region/Environment/Modules/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/TreePopulatorModule.cs index ec977ba..2051a0f 100644 --- a/OpenSim/Region/Environment/Modules/TreePopulatorModule.cs +++ b/OpenSim/Region/Environment/Modules/TreePopulatorModule.cs @@ -27,10 +27,13 @@ using System; using System.Collections.Generic; +using System.Reflection; +using System.Timers; +using Axiom.Math; using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -42,7 +45,7 @@ namespace OpenSim.Region.Environment.Modules public class TreePopulatorModule : IRegionModule { private Scene m_scene; - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private List m_trees; @@ -63,8 +66,8 @@ namespace OpenSim.Region.Environment.Modules m_scene.EventManager.OnPluginConsole += new EventManager.OnPluginConsoleDelegate(EventManager_OnPluginConsole); - System.Timers.Timer CalculateTrees = new System.Timers.Timer(m_tree_updates); - CalculateTrees.Elapsed += new System.Timers.ElapsedEventHandler(CalculateTrees_Elapsed); + Timer CalculateTrees = new Timer(m_tree_updates); + CalculateTrees.Elapsed += new ElapsedEventHandler(CalculateTrees_Elapsed); CalculateTrees.Start(); m_log.Debug("[TREES]: Initialised tree module"); } @@ -168,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules } else { - selectedTree.SetText(killLikelyhood.ToString(), new Axiom.Math.Vector3(1.0f, 1.0f, 1.0f), 1.0); + selectedTree.SetText(killLikelyhood.ToString(), new Vector3(1.0f, 1.0f, 1.0f), 1.0); } } else @@ -217,7 +220,7 @@ namespace OpenSim.Region.Environment.Modules tree.SendGroupFullUpdate(); } - void CalculateTrees_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + void CalculateTrees_Elapsed(object sender, ElapsedEventArgs e) { growTrees(); seedTrees(); diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs index 59ec981..b487628 100644 --- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs @@ -25,15 +25,12 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; - +using System.Reflection; using libsecondlife; -using libsecondlife.Packets; - +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Limit; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -46,8 +43,8 @@ namespace OpenSim.Region.Environment.Modules /// public class UserTextureDownloadService { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// We will allow the client to request the same texture n times before dropping further requests diff --git a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs index 9c91b25..0ea6fc3 100644 --- a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs @@ -27,15 +27,17 @@ using System; using System.Drawing; +using System.Drawing.Imaging; +using System.Globalization; using System.IO; using System.Net; -using System.Globalization; using libsecondlife; using Nini.Config; using OpenJPEGNet; -using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; +using Image=System.Drawing.Image; + //using Cairo; namespace OpenSim.Region.Environment.Modules @@ -96,9 +98,9 @@ namespace OpenSim.Region.Environment.Modules if ((size < 128) || (size > 1024)) size = 256; - Bitmap bitmap = new Bitmap(size, size, System.Drawing.Imaging.PixelFormat.Format32bppArgb); + Bitmap bitmap = new Bitmap(size, size, PixelFormat.Format32bppArgb); - System.Drawing.Graphics graph = System.Drawing.Graphics.FromImage(bitmap); + Graphics graph = Graphics.FromImage(bitmap); extraParams = extraParams.ToLower(); int alpha = 255; @@ -166,11 +168,11 @@ namespace OpenSim.Region.Environment.Modules } */ - private void GDIDraw(string data, System.Drawing.Graphics graph) + private void GDIDraw(string data, Graphics graph) { - System.Drawing.Point startPoint = new System.Drawing.Point(0, 0); - System.Drawing.Point endPoint = new System.Drawing.Point(0, 0); - System.Drawing.Pen drawPen = new Pen(System.Drawing.Color.Black, 7); + Point startPoint = new Point(0, 0); + Point endPoint = new Point(0, 0); + Pen drawPen = new Pen(Color.Black, 7); Font myFont = new Font("Times New Roman", 14); SolidBrush myBrush = new SolidBrush(Color.Black); char[] lineDelimiter = { ';' }; @@ -213,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules GetParams(partsDelimiter, ref nextLine, 5, ref x, ref y); endPoint.X = (int)x; endPoint.Y = (int)y; - System.Drawing.Image image = ImageHttpRequest(nextLine); + Image image = ImageHttpRequest(nextLine); graph.DrawImage(image, (float)startPoint.X, (float)startPoint.Y, x, y); startPoint.X += endPoint.X; startPoint.Y += endPoint.Y; diff --git a/OpenSim/Region/Environment/Modules/VoiceModule.cs b/OpenSim/Region/Environment/Modules/VoiceModule.cs index 8ca4698..106becd 100644 --- a/OpenSim/Region/Environment/Modules/VoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/VoiceModule.cs @@ -27,23 +27,24 @@ using System; using System.Collections; -using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Region.Capabilities; -using Caps = OpenSim.Region.Capabilities.Caps; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; +using Caps=OpenSim.Region.Capabilities.Caps; namespace OpenSim.Region.Environment.Modules { public class VoiceModule : IRegionModule { - private static readonly log4net.ILog m_log = - log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = + LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; private IConfig m_config; diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs index 79e475c..5b18757 100644 --- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs @@ -27,7 +27,6 @@ using System; using System.Collections; -using System.Collections.Generic; using libsecondlife; using Nini.Config; using OpenSim.Framework; diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index 4f52ad6..e915fb8 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs @@ -28,11 +28,14 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Net; +using System.Reflection; using System.Threading; using libsecondlife; +using log4net; using Nini.Config; using Nwc.XmlRpc; -using OpenSim.Framework.Console; +using OpenSim.Framework; using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -74,7 +77,7 @@ namespace OpenSim.Region.Environment.Modules { public class XMLRPCModule : IRegionModule, IXMLRPC { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private object XMLRPCListLock = new object(); private string m_name = "XMLRPCModule"; @@ -208,7 +211,7 @@ namespace OpenSim.Region.Environment.Modules } } - System.Collections.IEnumerator tmpEnumerator = tmp.GetEnumerator(); + IEnumerator tmpEnumerator = tmp.GetEnumerator(); while ( tmpEnumerator.MoveNext() ) m_openChannels.Remove((LLUUID)tmpEnumerator.Current); } @@ -559,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules private Thread httpThread; public LLUUID m_itemID; public uint m_localID; - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public SendRemoteDataRequest(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) { @@ -583,7 +586,7 @@ namespace OpenSim.Region.Environment.Modules httpThread.IsBackground = true; finished = false; httpThread.Start(); - OpenSim.Framework.ThreadTracker.Add(httpThread); + ThreadTracker.Add(httpThread); return reqID; @@ -648,7 +651,7 @@ namespace OpenSim.Region.Environment.Modules } } } - catch (System.Net.WebException we) + catch (WebException we) { sdata = we.Message; m_log.Warn("[SendRemoteDataRequest]: Request failed"); diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index 29987d8..12ef110 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs @@ -26,8 +26,9 @@ */ using libsecondlife; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; + namespace OpenSim.Region.Environment { public class PermissionManager diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs index 75d4870..fe9c8e7 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs @@ -25,11 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.Xml; using libsecondlife; -using OpenSim.Framework.Console; namespace OpenSim.Region.Environment.Scenes { diff --git a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs index 750129b..8f29507 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAppearance.cs @@ -26,11 +26,11 @@ */ using System; +using System.Runtime.Serialization; +using System.Security.Permissions; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework; -using System.Runtime.Serialization; -using System.Security.Permissions; namespace OpenSim.Region.Environment.Scenes { @@ -159,7 +159,7 @@ namespace OpenSim.Region.Environment.Scenes if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } m_scenePresenceID = new LLUUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid))); @@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Scenes { if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } info.AddValue("m_scenePresenceID", m_scenePresenceID.UUID); diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 438118f..1faba9a 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs @@ -25,13 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System.Collections.Generic; -using Axiom.Math; -using libsecondlife; - using System; using System.Runtime.Serialization; using System.Security.Permissions; +using Axiom.Math; +using libsecondlife; namespace OpenSim.Region.Environment.Scenes { @@ -145,7 +143,7 @@ namespace OpenSim.Region.Environment.Scenes if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } m_uuid = new LLUUID((Guid)info.GetValue("m_uuid", typeof(Guid))); @@ -188,7 +186,7 @@ namespace OpenSim.Region.Environment.Scenes { if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } info.AddValue("m_uuid", m_uuid.UUID); diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 8894db0..329f900 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -27,11 +27,12 @@ using System; using System.Collections.Generic; +using System.Reflection; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Types; using OpenSim.Region.Physics.Manager; @@ -41,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes public class InnerScene { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); #region Events @@ -295,7 +296,7 @@ namespace OpenSim.Region.Environment.Scenes public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) { - System.Console.WriteLine("Attaching object " + objectLocalID + " to " + AttachmentPt); + Console.WriteLine("Attaching object " + objectLocalID + " to " + AttachmentPt); SceneObjectPart p = GetSceneObjectPart(objectLocalID); if (p != null) { diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 2db9242..c5a1be1 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -27,23 +27,21 @@ using System; using System.Collections.Generic; -using Axiom.Math; +using System.Reflection; +using System.Text; using libsecondlife; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; -using System.IO; -using System.Text; -using System.Xml; using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Scenes { public partial class Scene { - private static readonly log4net.ILog m_log - = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Start all the scripts in the scene which should be started. @@ -454,7 +452,7 @@ namespace OpenSim.Region.Environment.Scenes InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); if (item != null) { - if (newName != System.String.Empty) + if (newName != String.Empty) { item.Name = newName; } @@ -1014,7 +1012,7 @@ namespace OpenSim.Region.Environment.Scenes public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt, uint ItemFlags, uint NextOwnerMask) { - System.Console.WriteLine("RezSingleAttachment: unimplemented yet"); + Console.WriteLine("RezSingleAttachment: unimplemented yet"); } } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 7e2c9ff..8fdb468 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -29,8 +29,6 @@ using System.Collections.Generic; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework; -using OpenSim.Framework.UserManagement; -using OpenSim.Framework.Console; namespace OpenSim.Region.Environment.Scenes { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a3f6948..6d8d481 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -40,11 +40,12 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Modules.Terrain; using OpenSim.Region.Environment.Scenes.Scripting; using OpenSim.Region.Physics.Manager; -using Caps = OpenSim.Region.Capabilities.Caps; -using Image = System.Drawing.Image; -using Timer = System.Timers.Timer; +using Caps=OpenSim.Region.Capabilities.Caps; +using Image=System.Drawing.Image; +using Timer=System.Timers.Timer; namespace OpenSim.Region.Environment.Scenes { @@ -580,7 +581,7 @@ namespace OpenSim.Region.Environment.Scenes if (!avatar.IsChildAgent) avatar.ControllingClient.Kick("The simulator is going down."); - avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator), + avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(PacketType.DisableSimulator), ThrottleOutPacketType.Task); }); @@ -755,17 +756,17 @@ namespace OpenSim.Region.Environment.Scenes { throw; } - catch (System.AccessViolationException e) + catch (AccessViolationException e) { m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); } - catch (System.NullReferenceException e) + catch (NullReferenceException e) { m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); } - catch (System.InvalidOperationException e) + catch (InvalidOperationException e) { m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); @@ -941,13 +942,13 @@ namespace OpenSim.Region.Environment.Scenes if (map == null) { m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); - Heightmap = new Modules.Terrain.TerrainChannel(); + Heightmap = new TerrainChannel(); m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); } else { - Heightmap = new Modules.Terrain.TerrainChannel(map); + Heightmap = new TerrainChannel(map); } } @@ -1094,7 +1095,7 @@ namespace OpenSim.Region.Environment.Scenes byte[] data; try { - data = OpenJPEGNet.OpenJPEG.EncodeFromImage(mapbmp, false); + data = OpenJPEG.EncodeFromImage(mapbmp, false); } catch (Exception) { @@ -1420,7 +1421,7 @@ namespace OpenSim.Region.Environment.Scenes { DeleteSceneObjectGroup(grp); } - catch (System.Exception) + catch (Exception) { m_log.Warn("[DATABASE]: exception when trying to remove the prim that crossed the border."); } @@ -1714,7 +1715,7 @@ namespace OpenSim.Region.Environment.Scenes { client.SendKillObject(avatar.RegionHandle, avatar.LocalId); } - catch (System.NullReferenceException) + catch (NullReferenceException) { //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. } @@ -2041,7 +2042,7 @@ namespace OpenSim.Region.Environment.Scenes m_innerScene.removeUserCount(true); } // Tell a single agent to disconnect from the region. - libsecondlife.Packets.DisableSimulatorPacket disable = (libsecondlife.Packets.DisableSimulatorPacket)PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator); + DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); presence.ControllingClient.OutPacket(disable, ThrottleOutPacketType.Unknown); presence.ControllingClient.Close(true); } diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 5551173..d9dc1da 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -27,18 +27,18 @@ using System; using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; -using OpenSim.Region.Terrain; using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Scenes { public abstract class SceneBase : IScene { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); #region Events @@ -204,7 +204,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// XXX These two methods are very temporary /// - protected Dictionary capsPaths = new Dictionary(); + protected Dictionary capsPaths = new Dictionary(); public string GetCapsPath(LLUUID agentId) { if (capsPaths.ContainsKey(agentId)) diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index db2327e..0062e4d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -28,10 +28,11 @@ using System; using System.Collections.Generic; using System.Net; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; namespace OpenSim.Region.Environment.Scenes { @@ -41,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes public class SceneCommunicationService //one instance per region { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected CommunicationsManager m_commsProvider; protected RegionInfo m_regionInfo; @@ -416,7 +417,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - catch (System.InvalidOperationException) + catch (InvalidOperationException) { // We're ignoring a collection was modified error because this data gets old and outdated fast. } diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index 5cf8ece..c9c0ad6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -25,11 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using libsecondlife; using System; +using libsecondlife; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; -using Caps = OpenSim.Region.Capabilities.Caps; +using Caps=OpenSim.Region.Capabilities.Caps; namespace OpenSim.Region.Environment.Scenes { @@ -155,7 +155,7 @@ namespace OpenSim.Region.Environment.Scenes public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); public event DeregisterCapsEvent OnDeregisterCaps; - public class MoneyTransferArgs : System.EventArgs + public class MoneyTransferArgs : EventArgs { public LLUUID sender; public LLUUID receiver; @@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public class LandBuyArgs : System.EventArgs + public class LandBuyArgs : EventArgs { public LLUUID agentId = LLUUID.Zero; diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 102be30..61a4eae 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -28,10 +28,10 @@ using System; using System.Collections.Generic; using System.Net; -using System.Net.Sockets; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; namespace OpenSim.Region.Environment.Scenes { @@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes public class SceneManager { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public event RestartSim OnRestartSim; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 495b604..d9808e6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs @@ -25,19 +25,17 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; - +using System.Reflection; using libsecondlife; - +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Scenes { public partial class SceneObjectGroup : EntityBase { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Start a given script. diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 7abaaee..8651d7e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -29,13 +29,11 @@ using System; using System.Collections.Generic; using System.Drawing; using System.IO; -using System.Text; using System.Xml; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Physics.Manager; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 8ce71c4..72f78f3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -27,13 +27,11 @@ using System; using System.Collections.Generic; -using System.Xml.Serialization; - +using System.Reflection; using libsecondlife; - +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes.Scripting; @@ -41,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes { public partial class SceneObjectPart : IScriptHost { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string m_inventoryFileName = String.Empty; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 61d10c9..40a9fcf 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -28,18 +28,16 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Runtime.Serialization; +using System.Security.Permissions; using System.Xml; using System.Xml.Serialization; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes.Scripting; using OpenSim.Region.Physics.Manager; -using System.Runtime.Serialization; -using System.Security.Permissions; namespace OpenSim.Region.Environment.Scenes { @@ -324,7 +322,7 @@ namespace OpenSim.Region.Environment.Scenes ParentGroup.ResetChildPrimPhysicsPositions(); } - catch (System.NullReferenceException) + catch (NullReferenceException) { // Ignore, and skip over. } @@ -2326,7 +2324,7 @@ namespace OpenSim.Region.Environment.Scenes if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } /* @@ -2344,7 +2342,7 @@ namespace OpenSim.Region.Environment.Scenes { if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } info.AddValue("m_inventoryFileName", m_inventoryFileName); diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 8b8373d..d85eea6 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -27,16 +27,16 @@ using System; using System.Collections.Generic; +using System.Reflection; +using System.Runtime.Serialization; +using System.Security.Permissions; using Axiom.Math; using libsecondlife; using libsecondlife.Packets; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Types; using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Environment.Interfaces; -using System.Runtime.Serialization; -using System.Security.Permissions; namespace OpenSim.Region.Environment.Scenes { @@ -48,7 +48,7 @@ namespace OpenSim.Region.Environment.Scenes // System.Console.WriteLine("[ScenePresence] Destructor called"); // } - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static AvatarAnimations Animations = new AvatarAnimations(); public static byte[] DefaultTexture; @@ -1746,7 +1746,7 @@ namespace OpenSim.Region.Environment.Scenes movementvector.Z = force.Z; Velocity = movementvector; } - catch (System.NullReferenceException) + catch (NullReferenceException) { // Under extreme load, this returns a NullReference Exception that we can ignore. // Ignoring this causes no movement to be sent to the physics engine... @@ -1800,7 +1800,7 @@ namespace OpenSim.Region.Environment.Scenes if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } FullID = new LLUUID((Guid)info.GetValue("FullID", typeof(Guid))); @@ -1817,7 +1817,7 @@ namespace OpenSim.Region.Environment.Scenes { if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } info.AddValue("FullID", FullID.UUID); @@ -1928,7 +1928,7 @@ namespace OpenSim.Region.Environment.Scenes if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } /* JB if (Animations == null) @@ -2100,7 +2100,7 @@ namespace OpenSim.Region.Environment.Scenes { if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } base.GetObjectData(info, context); diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs index 18b3f46..b1ee519 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenSim.Framework.Console; - //TODO: WHERE TO PLACE THIS? namespace OpenSim.Region.Environment.Scenes.Scripting diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs index 7dee2e4..6216e2c 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs @@ -29,13 +29,13 @@ using System; using System.IO; using System.Reflection; -using OpenSim.Framework.Console; +using log4net; namespace OpenSim.Region.Environment.Scenes.Scripting { public class ScriptEngineLoader { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public ScriptEngineInterface LoadScriptEngine(string EngineName) { diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 4cbadba..b9a42a2 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs @@ -27,14 +27,14 @@ using System; using System.Reflection; -using OpenSim.Framework.Console; +using log4net; using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment { public class StorageManager { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IRegionDataStore m_dataStore; diff --git a/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs b/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs index f1f2302..24ce94b 100644 --- a/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs +++ b/OpenSim/Region/Environment/Types/BasicQuadTreeNode.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using OpenSim.Region.Environment.Scenes; @@ -261,7 +262,7 @@ namespace OpenSim.Region.Environment.Types public string[] GetNeighbours(string nodeName) { string[] retVal = new string[1]; - retVal[0] = System.String.Empty; + retVal[0] = String.Empty; return retVal; } } diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index 4d273ce..ec1ffd2 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs @@ -25,13 +25,12 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; -using libsecondlife; -using OpenSim.Region.Environment.Scenes; - -using System; using System.Runtime.Serialization; using System.Security.Permissions; +using libsecondlife; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Types { @@ -97,7 +96,7 @@ namespace OpenSim.Region.Environment.Types if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } m_queue = (Queue)info.GetValue("m_queue", typeof(Queue)); @@ -118,7 +117,7 @@ namespace OpenSim.Region.Environment.Types { if (info == null) { - throw new System.ArgumentNullException("info"); + throw new ArgumentNullException("info"); } List ids_work = new List(); diff --git a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs index aeb79e0..e0e8fd9 100644 --- a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs @@ -26,7 +26,6 @@ */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs index 218908c..6e9fe6d 100644 --- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs +++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs @@ -25,10 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.IO; -using System.Text; using libsecondlife; using Nini.Config; using OpenSim.Framework; diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs index deb289f..43049fc 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs @@ -28,14 +28,15 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; +using System.Reflection; +using log4net; using Microsoft.CSharp; -using OpenSim.Framework.Console; namespace OpenSim.Region.ExtensionsScriptModule.CSharp { public class CSharpScriptEngine : IScriptCompiler { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string FileExt() { diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs index f5689cb..52afe3f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs @@ -28,14 +28,15 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; +using System.Reflection; +using log4net; using Microsoft.JScript; -using OpenSim.Framework.Console; namespace OpenSim.Region.ExtensionsScriptModule.JScript { public class JScriptEngine : IScriptCompiler { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string FileExt() { diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Interpreter.Methods.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Interpreter.Methods.cs index 16c6e79..efd01e9 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Interpreter.Methods.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Interpreter.Methods.cs @@ -25,6 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; + namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM { partial class Thread @@ -46,8 +48,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.JVM string typ = ((ClassRecord.PoolMethodRef) m_thread.currentClass.m_constantsPool[refIndex - 1]). mNameType.Type.Value; - string typeparam = System.String.Empty; - string typereturn = System.String.Empty; + string typeparam = String.Empty; + string typereturn = String.Empty; int firstbrak = 0; int secondbrak = 0; firstbrak = typ.LastIndexOf('('); diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs index 428192f..16c449f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs @@ -25,8 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System.Reflection; using libsecondlife; -using OpenSim.Framework.Console; +using log4net; using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.ExtensionsScriptModule @@ -36,7 +37,7 @@ namespace OpenSim.Region.ExtensionsScriptModule /// public class ScriptInfo { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // Reference to world.eventsManager provided for convenience public EventManager events; @@ -47,7 +48,7 @@ namespace OpenSim.Region.ExtensionsScriptModule // API Access public ScriptAPI api; - public log4net.ILog Log + public ILog Log { get { return m_log; } } diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs index d0a0e86..a11fb0f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs @@ -26,9 +26,10 @@ */ using System; +using System.Reflection; using System.Text; using Axiom.Math; -using OpenSim.Framework.Console; +using log4net; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using Key = libsecondlife.LLUUID; @@ -44,7 +45,7 @@ namespace OpenSim.Region.ExtensionsScriptModule /// Avoid at all costs. This should ONLY be used for LSL. internal class ScriptInterpretedAPI { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Key m_object; protected Scene m_scene; diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs index 9edc6dc..8c11f7a 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs @@ -26,8 +26,9 @@ */ using System.Collections.Generic; +using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ExtensionsScriptModule.CSharp; @@ -38,7 +39,7 @@ namespace OpenSim.Region.ExtensionsScriptModule { public class ScriptManager : IRegionModule, IExtensionScriptModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly List scripts = new List(); private Scene m_scene; diff --git a/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs b/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs index d6ef1fb..2d9f32f 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs @@ -26,11 +26,10 @@ */ using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; +using libsecondlife; using OpenSim.Data.Base; +using OpenSim.Framework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Modules.AvatarFactory { @@ -52,7 +51,7 @@ namespace OpenSim.Region.Modules.AvatarFactory m_keyFieldMapper = rowMapperSchema.AddMapping("UUID", delegate(AppearanceRowMapper mapper) { return mapper.Object.ScenePresenceID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.ScenePresenceID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.ScenePresenceID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("Serial", delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.WearablesSerial; }, @@ -64,127 +63,127 @@ namespace OpenSim.Region.Modules.AvatarFactory { if (mapper.Object.Wearables == null) { - mapper.Object.Wearables = new OpenSim.Framework.AvatarWearable[13]; + mapper.Object.Wearables = new AvatarWearable[13]; for (int i = 0; i < 13; i++) { mapper.Object.Wearables[i] = new AvatarWearable(); } } - mapper.Object.Wearables[0].ItemID = new libsecondlife.LLUUID(value.ToString()); + mapper.Object.Wearables[0].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset0", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[0].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[0].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem1", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset1", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[1].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[1].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem2", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset2", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[2].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[2].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem3", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset3", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[3].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[3].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem4", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset4", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[4].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[4].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem5", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset5", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[5].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[5].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem6", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset6", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[6].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[6].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem7", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset7", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[7].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[7].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem8", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset8", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[8].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[8].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem9", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset9", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[9].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[9].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem10", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset10", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[10].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[10].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem11", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset11", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[11].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[11].AssetID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableItem12", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.UUID; }, - delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new libsecondlife.LLUUID(value.ToString()); }); + delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new LLUUID(value.ToString()); }); rowMapperSchema.AddMapping("WearableAsset12", delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.UUID; }, delegate(AppearanceRowMapper mapper, Guid value) - { mapper.Object.Wearables[12].AssetID = new libsecondlife.LLUUID(value.ToString()); }); + { mapper.Object.Wearables[12].AssetID = new LLUUID(value.ToString()); }); } diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index ae522ef..0ee8848 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs @@ -30,12 +30,12 @@ using System.Collections.Generic; using System.Threading; using libsecondlife; using Nini.Config; +using OpenSim.Data.Base; +using OpenSim.Data.MapperFactory; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Data.Base; -using OpenSim.Data.MapperFactory; namespace OpenSim.Region.Modules.AvatarFactory { diff --git a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs index ec9714a..a9fe53e 100644 --- a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs @@ -26,7 +26,6 @@ */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs index e50a89e..c9f8423 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs @@ -26,7 +26,6 @@ */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index aaa7acf..4046a7c 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs @@ -1,20 +1,23 @@ using System; using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Timers; +using log4net; using Nini.Config; using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Modules.ExportSerialiser; - -using PumaCode.SvnDotNet.SubversionSharp; +using OpenSim.Region.Environment.Modules.Terrain; +using OpenSim.Region.Environment.Scenes; using PumaCode.SvnDotNet.AprSharp; - +using PumaCode.SvnDotNet.SubversionSharp; using Slash=System.IO.Path; namespace OpenSim.Region.Modules.SvnSerialiser { public class SvnBackupModule : IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private SvnClient m_svnClient; private bool m_enabled = false; @@ -26,7 +29,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0); private bool m_svnAutoSave = false; - private System.Timers.Timer m_timer = new System.Timers.Timer(); + private Timer m_timer = new Timer(); private IRegionSerialiser m_serialiser; private List m_scenes = new List(); @@ -87,7 +90,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser { scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + Slash.DirectorySeparatorChar + "objects.xml"); - scene.RequestModuleInterface().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + + scene.RequestModuleInterface().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + Slash.DirectorySeparatorChar + "heightmap.r32"); m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); } @@ -104,16 +107,16 @@ namespace OpenSim.Region.Modules.SvnSerialiser private void CheckoutSvnPartial(string subdir) { - if (!System.IO.Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) - System.IO.Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); + if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) + Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false); } private void CheckoutSvnPartial(string subdir, SvnRevision revision) { - if (!System.IO.Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) - System.IO.Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); + if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) + Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false); } @@ -138,7 +141,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser { foreach (SvnClientCommitItem2 item in commitItems) { - m_log.Debug("[SVNBACKUP]: ... " + System.IO.Path.GetFileName(item.Path.ToString()) + " (" + item.Kind.ToString() + ") r" + item.Revision.ToString()); + m_log.Debug("[SVNBACKUP]: ... " + Path.GetFileName(item.Path.ToString()) + " (" + item.Kind.ToString() + ") r" + item.Revision.ToString()); } } @@ -277,7 +280,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser if (m_svnAutoSave == true) { m_timer.Interval = m_svnperiod.TotalMilliseconds; - m_timer.Elapsed += new System.Timers.ElapsedEventHandler(m_timer_Elapsed); + m_timer.Elapsed += new ElapsedEventHandler(m_timer_Elapsed); m_timer.AutoReset = true; m_timer.Start(); } @@ -300,7 +303,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser } } - void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + void m_timer_Elapsed(object sender, ElapsedEventArgs e) { SaveAllRegions(); } @@ -322,8 +325,8 @@ namespace OpenSim.Region.Modules.SvnSerialiser private void CreateSvnDirectory() { - if (!System.IO.Directory.Exists(m_svndir)) - System.IO.Directory.CreateDirectory(m_svndir); + if (!Directory.Exists(m_svndir)) + Directory.CreateDirectory(m_svndir); } public void Close() diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 6cc7ff4..1ad1201 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -31,12 +31,10 @@ using System; using System.Collections.Generic; using MonoXnaCompactMaths; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; using XnaDevRu.BulletX; using XnaDevRu.BulletX.Dynamics; using AxiomQuaternion = Axiom.Math.Quaternion; -using BoxShape=XnaDevRu.BulletX.BoxShape; #endregion diff --git a/OpenSim/Region/Physics/Manager/CollisionLocker.cs b/OpenSim/Region/Physics/Manager/CollisionLocker.cs index f88554b..29a6188 100644 --- a/OpenSim/Region/Physics/Manager/CollisionLocker.cs +++ b/OpenSim/Region/Physics/Manager/CollisionLocker.cs @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; -using System.Text; namespace OpenSim.Region.Physics.Manager { diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index 73b2721..e4ff725 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs @@ -29,7 +29,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Reflection; -using OpenSim.Framework.Console; +using log4net; namespace OpenSim.Region.Physics.Manager { @@ -38,7 +38,7 @@ namespace OpenSim.Region.Physics.Manager /// public class PhysicsPluginManager { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Dictionary _PhysPlugins = new Dictionary(); private Dictionary _MeshPlugins = new Dictionary(); diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index d3699a3..4c509b7 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -25,10 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; +using System.Reflection; using Axiom.Math; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; namespace OpenSim.Region.Physics.Manager { @@ -36,7 +36,7 @@ namespace OpenSim.Region.Physics.Manager public abstract class PhysicsScene { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // The only thing that should register for this event is the InnerScene // Anything else could cause problems. diff --git a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs index a86d283..ce53108 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs @@ -26,10 +26,7 @@ */ using System; -using System.Collections.Generic; using System.Timers; -using Axiom.Math; -using OpenSim.Framework; namespace OpenSim.Region.Physics.Manager { diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index d4b6a50..db91028 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -28,7 +28,6 @@ using System; using System.Collections.Generic; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.Meshing diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index c518b78..2896d3b 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs @@ -27,7 +27,6 @@ using System; using System.Collections.Generic; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.Meshing diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 81126b6..042042c 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -121,7 +121,7 @@ namespace OpenSim.Region.Physics.OdePlugin _acceleration = new PhysicsVector(); _parent_scene = parent_scene; - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { m_tensor = 2000000f; } @@ -413,7 +413,7 @@ namespace OpenSim.Region.Physics.OdePlugin private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor) { - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { m_tensor = 2000000f; } @@ -641,7 +641,7 @@ namespace OpenSim.Region.Physics.OdePlugin // If the PID Controller isn't active then we set our force // calculating base velocity to the current position - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { PID_D = 3200.0f; PID_P = 1400.0f; diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 4e39eb4..8e0640b 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -27,8 +27,11 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Runtime.InteropServices; +using System.Threading; using Axiom.Math; +using log4net; using Ode.NET; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -37,7 +40,7 @@ namespace OpenSim.Region.Physics.OdePlugin { public class OdePrim : PhysicsActor { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public PhysicsVector _position; private PhysicsVector _velocity; @@ -663,7 +666,7 @@ namespace OpenSim.Region.Physics.OdePlugin // This sleeper is there to moderate how long it takes between // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object - System.Threading.Thread.Sleep(10); + Thread.Sleep(10); //Kill Body so that mesh can re-make the geom if (IsPhysical && Body != (IntPtr) 0) @@ -692,7 +695,7 @@ namespace OpenSim.Region.Physics.OdePlugin SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null)); } } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Error("[PHYSICS]: MESH LOCKED"); @@ -934,7 +937,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -948,7 +951,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -963,7 +966,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -990,7 +993,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -1135,7 +1138,7 @@ namespace OpenSim.Region.Physics.OdePlugin // If the PID Controller isn't active then we set our force // calculating base velocity to the current position - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { PID_D = 3200.0f; //PID_P = 1400.0f; @@ -1670,7 +1673,7 @@ namespace OpenSim.Region.Physics.OdePlugin { - System.Threading.Thread.Sleep(20); + Thread.Sleep(20); if (IsPhysical) { if (Body != (IntPtr)0) diff --git a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs index f56cf5c..94d98cb 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs @@ -26,15 +26,10 @@ */ using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; using Axiom.Math; -using Ode.NET; +using NUnit.Framework; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; -using NUnit.Framework; -using NUnit.Framework.SyntaxHelpers; namespace OpenSim.Region.Physics.OdePlugin { diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a2f440e..c346960 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -27,11 +27,13 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Runtime.InteropServices; +using System.Threading; using Axiom.Math; +using log4net; using Ode.NET; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; //using OpenSim.Region.Physics.OdePlugin.Meshing; @@ -114,12 +116,12 @@ namespace OpenSim.Region.Physics.OdePlugin public class OdeScene : PhysicsScene { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Dictionary m_storedCollisions = new Dictionary(); CollisionLocker ode; - protected Random fluidRandomizer = new Random(System.Environment.TickCount); + protected Random fluidRandomizer = new Random(Environment.TickCount); private const uint m_regionWidth = Constants.RegionSize; private const uint m_regionHeight = Constants.RegionSize; @@ -331,7 +333,7 @@ namespace OpenSim.Region.Physics.OdePlugin { d.SpaceCollide2(g1, g2, IntPtr.Zero, nearCallback); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to collide test a space"); return; @@ -404,7 +406,7 @@ namespace OpenSim.Region.Physics.OdePlugin ode.drelease(world); base.TriggerPhysicsBasedRestart(); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to collide test an object"); @@ -1166,7 +1168,7 @@ namespace OpenSim.Region.Physics.OdePlugin } } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed."); } @@ -1243,7 +1245,7 @@ namespace OpenSim.Region.Physics.OdePlugin // never be called if the prim is physical(active) // All physical prim end up in the root space - System.Threading.Thread.Sleep(20); + Thread.Sleep(20); if (currentspace != space) { //m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString()); diff --git a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs index a429272..1a50f0b 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.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.Region.Environment.Scenes; diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index b6468c2..8aee94e 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -26,15 +26,14 @@ */ using System; -using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; using System.Threading; -using OpenSim.Region.ScriptEngine.Common; +using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; using integer = System.Int32; using key = System.String; -using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3; -using rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion; +using vector = ScriptEngine.Common.LSL_Types.Vector3; +using rotation = Quaternion; namespace OpenSim.Region.ScriptEngine.Common { @@ -151,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Common // They are only forwarders to LSL_BuiltIn_Commands.cs // - public OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name) + public ICommander GetCommander(string name) { return m_LSL_Functions.GetCommander(name); } @@ -216,52 +215,52 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llRound(f); } - public double llVecMag(vector v) + public double llVecMag(LSL_Types.Vector3 v) { return m_LSL_Functions.llVecMag(v); } - public vector llVecNorm(vector v) + public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) { return m_LSL_Functions.llVecNorm(v); } - public double llVecDist(vector a, vector b) + public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) { return m_LSL_Functions.llVecDist(a, b); } - public vector llRot2Euler(rotation r) + public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Euler(r); } - public rotation llEuler2Rot(vector v) + public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) { return m_LSL_Functions.llEuler2Rot(v); } - public rotation llAxes2Rot(vector fwd, vector left, vector up) + public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) { return m_LSL_Functions.llAxes2Rot(fwd, left, up); } - public vector llRot2Fwd(rotation r) + public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Fwd(r); } - public vector llRot2Left(rotation r) + public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Left(r); } - public vector llRot2Up(rotation r) + public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) { return m_LSL_Functions.llRot2Up(r); } - public rotation llRotBetween(vector start, vector end) + public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end) { return m_LSL_Functions.llRotBetween(start, end); } @@ -334,22 +333,22 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llDetectedType(number); } - public vector llDetectedPos(int number) + public LSL_Types.Vector3 llDetectedPos(int number) { return m_LSL_Functions.llDetectedPos(number); } - public vector llDetectedVel(int number) + public LSL_Types.Vector3 llDetectedVel(int number) { return m_LSL_Functions.llDetectedVel(number); } - public vector llDetectedGrab(int number) + public LSL_Types.Vector3 llDetectedGrab(int number) { return m_LSL_Functions.llDetectedGrab(number); } - public rotation llDetectedRot(int number) + public LSL_Types.Quaternion llDetectedRot(int number) { return m_LSL_Functions.llDetectedRot(number); } @@ -372,17 +371,17 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llDie(); } - public double llGround(vector offset) + public double llGround(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGround(offset); } - public double llCloud(vector offset) + public double llCloud(LSL_Types.Vector3 offset) { return m_LSL_Functions.llCloud(offset); } - public vector llWind(vector offset) + public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) { return m_LSL_Functions.llWind(offset); } @@ -397,17 +396,17 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetStatus(status); } - public void llSetScale(vector scale) + public void llSetScale(LSL_Types.Vector3 scale) { m_LSL_Functions.llSetScale(scale); } - public vector llGetScale() + public LSL_Types.Vector3 llGetScale() { return m_LSL_Functions.llGetScale(); } - public void llSetColor(vector color, int face) + public void llSetColor(LSL_Types.Vector3 color, int face) { m_LSL_Functions.llSetColor(color, face); } @@ -422,7 +421,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetAlpha(alpha, face); } - public vector llGetColor(int face) + public LSL_Types.Vector3 llGetColor(int face) { return m_LSL_Functions.llGetColor(face); } @@ -455,47 +454,47 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public void llSetPos(vector pos) + public void llSetPos(LSL_Types.Vector3 pos) { m_LSL_Functions.llSetPos(pos); } - public vector llGetPos() + public LSL_Types.Vector3 llGetPos() { return m_LSL_Functions.llGetPos(); } - public vector llGetLocalPos() + public LSL_Types.Vector3 llGetLocalPos() { return m_LSL_Functions.llGetLocalPos(); } - public void llSetRot(rotation rot) + public void llSetRot(LSL_Types.Quaternion rot) { m_LSL_Functions.llSetRot(rot); } - public rotation llGetRot() + public LSL_Types.Quaternion llGetRot() { return m_LSL_Functions.llGetRot(); } - public rotation llGetLocalRot() + public LSL_Types.Quaternion llGetLocalRot() { return m_LSL_Functions.llGetLocalRot(); } - public void llSetForce(vector force, int local) + public void llSetForce(LSL_Types.Vector3 force, int local) { m_LSL_Functions.llSetForce(force, local); } - public vector llGetForce() + public LSL_Types.Vector3 llGetForce() { return m_LSL_Functions.llGetForce(); } - public int llTarget(vector position, double range) + public int llTarget(LSL_Types.Vector3 position, double range) { return m_LSL_Functions.llTarget(position, range); } @@ -505,7 +504,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llTargetRemove(number); } - public int llRotTarget(rotation rot, double error) + public int llRotTarget(LSL_Types.Quaternion rot, double error) { return m_LSL_Functions.llRotTarget(rot, error); } @@ -515,7 +514,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llRotTargetRemove(number); } - public void llMoveToTarget(vector target, double tau) + public void llMoveToTarget(LSL_Types.Vector3 target, double tau) { m_LSL_Functions.llMoveToTarget(target, tau); } @@ -525,7 +524,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llStopMoveToTarget(); } - public void llApplyImpulse(vector force, int local) + public void llApplyImpulse(LSL_Types.Vector3 force, int local) { m_LSL_Functions.llApplyImpulse(force, local); } @@ -533,37 +532,37 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public void llApplyRotationalImpulse(vector force, int local) + public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) { m_LSL_Functions.llApplyRotationalImpulse(force, local); } - public void llSetTorque(vector torque, int local) + public void llSetTorque(LSL_Types.Vector3 torque, int local) { m_LSL_Functions.llSetTorque(torque, local); } - public vector llGetTorque() + public LSL_Types.Vector3 llGetTorque() { return m_LSL_Functions.llGetTorque(); } - public void llSetForceAndTorque(vector force, vector torque, int local) + public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) { m_LSL_Functions.llSetForceAndTorque(force, torque, local); } - public vector llGetVel() + public LSL_Types.Vector3 llGetVel() { return m_LSL_Functions.llGetVel(); } - public vector llGetAccel() + public LSL_Types.Vector3 llGetAccel() { return m_LSL_Functions.llGetAccel(); } - public vector llGetOmega() + public LSL_Types.Vector3 llGetOmega() { return m_LSL_Functions.llGetOmega(); } @@ -691,12 +690,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llMakeFire(); } - public void llRezObject(string inventory, vector pos, rotation rot, int param) + public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Quaternion rot, int param) { m_LSL_Functions.llRezObject(inventory, pos, rot, param); } - public void llLookAt(vector target, double strength, double damping) + public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) { m_LSL_Functions.llLookAt(target, strength, damping); } @@ -809,7 +808,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSoundPreload(); } - public void llRotLookAt(rotation target, double strength, double damping) + public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) { m_LSL_Functions.llRotLookAt(target, strength, damping); } @@ -842,7 +841,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llStopPointAt(); } - public void llTargetOmega(vector axis, double spinrate, double gain) + public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) { m_LSL_Functions.llTargetOmega(axis, spinrate, gain); } @@ -852,7 +851,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetStartParameter(); } - public void llGodLikeRezObject(string inventory, vector pos) + public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) { m_LSL_Functions.llGodLikeRezObject(inventory, pos); } @@ -877,7 +876,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetLinkNumber(); } - public void llSetLinkColor(int linknumber, vector color, int face) + public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) { m_LSL_Functions.llSetLinkColor(linknumber, color, face); } @@ -940,12 +939,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llRemoveInventory(item); } - public void llSetText(string text, vector color, double alpha) + public void llSetText(string text, LSL_Types.Vector3 color, double alpha) { m_LSL_Functions.llSetText(text, color, alpha); } - public double llWater(vector offset) + public double llWater(LSL_Types.Vector3 offset) { return m_LSL_Functions.llWater(offset); } @@ -1005,7 +1004,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llMessageLinked(linknum, num, str, id); } - public void llPushObject(string target, vector impulse, vector ang_impulse, int local) + public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) { m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local); } @@ -1028,12 +1027,12 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public rotation llAxisAngle2Rot(vector axis, double angle) + public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { return m_LSL_Functions.llAxisAngle2Rot(axis, angle); } - public vector llRot2Axis(rotation rot) + public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) { return m_LSL_Functions.llRot2Axis(rot); } @@ -1053,7 +1052,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llAsin(val); } - public double llAngleBetween(rotation a, rotation b) + public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) { return m_LSL_Functions.llAngleBetween(a, b); } @@ -1068,17 +1067,17 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llAllowInventoryDrop(add); } - public vector llGetSunDirection() + public LSL_Types.Vector3 llGetSunDirection() { return m_LSL_Functions.llGetSunDirection(); } - public vector llGetTextureOffset(int face) + public LSL_Types.Vector3 llGetTextureOffset(int face) { return m_LSL_Functions.llGetTextureOffset(face); } - public vector llGetTextureScale(int side) + public LSL_Types.Vector3 llGetTextureScale(int side) { return m_LSL_Functions.llGetTextureScale(side); } @@ -1098,7 +1097,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetOwnerKey(id); } - public vector llGetCenterOfMass() + public LSL_Types.Vector3 llGetCenterOfMass() { return m_LSL_Functions.llGetCenterOfMass(); } @@ -1136,12 +1135,12 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llList2Key(src, index); } - public vector llList2Vector(LSL_Types.list src, int index) + public LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index) { return m_LSL_Functions.llList2Vector(src, index); } - public rotation llList2Rot(LSL_Types.list src, int index) + public LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index) { return m_LSL_Functions.llList2Rot(src, index); } @@ -1181,7 +1180,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llList2ListStrided(src, start, end, stride); } - public vector llGetRegionCorner() + public LSL_Types.Vector3 llGetRegionCorner() { return m_LSL_Functions.llGetRegionCorner(); } @@ -1211,7 +1210,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetDate(); } - public int llEdgeOfWorld(vector pos, vector dir) + public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) { return m_LSL_Functions.llEdgeOfWorld(pos, dir); } @@ -1249,7 +1248,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetTextureAnim(mode, face, sizex, sizey, start, length, rate); } - public void llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west) + public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west) { m_LSL_Functions.llTriggerSoundLimited(sound, volume, top_north_east, bottom_south_west); } @@ -1269,7 +1268,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llOverMyLand(id); } - public string llGetLandOwnerAt(vector pos) + public string llGetLandOwnerAt(LSL_Types.Vector3 pos) { return m_LSL_Functions.llGetLandOwnerAt(pos); } @@ -1279,7 +1278,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetNotecardLine(name, line); } - public vector llGetAgentSize(string id) + public LSL_Types.Vector3 llGetAgentSize(string id) { return m_LSL_Functions.llGetAgentSize(id); } @@ -1294,17 +1293,17 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llUnSit(id); } - public vector llGroundSlope(vector offset) + public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGroundSlope(offset); } - public vector llGroundNormal(vector offset) + public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGroundNormal(offset); } - public vector llGroundContour(vector offset) + public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) { return m_LSL_Functions.llGroundContour(offset); } @@ -1362,12 +1361,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetVehicledoubleParam(param, value); } - public void llSetVehicleVectorParam(int param, vector vec) + public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) { m_LSL_Functions.llSetVehicleVectorParam(param, vec); } - public void llSetVehicleRotationParam(int param, rotation rot) + public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) { m_LSL_Functions.llSetVehicleRotationParam(param, rot); } @@ -1382,7 +1381,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llRemoveVehicleFlags(flags); } - public void llSitTarget(vector offset, rotation rot) + public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) { m_LSL_Functions.llSitTarget(offset, rot); } @@ -1407,12 +1406,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetSitText(text); } - public void llSetCameraEyeOffset(vector offset) + public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) { m_LSL_Functions.llSetCameraEyeOffset(offset); } - public void llSetCameraAtOffset(vector offset) + public void llSetCameraAtOffset(LSL_Types.Vector3 offset) { m_LSL_Functions.llSetCameraAtOffset(offset); } @@ -1422,7 +1421,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llDumpList2String(src, seperator); } - public void llScriptDanger(vector pos) + public void llScriptDanger(LSL_Types.Vector3 pos) { m_LSL_Functions.llScriptDanger(pos); } @@ -1539,12 +1538,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetParcelMusicURL(url); } - public vector llGetRootPosition() + public LSL_Types.Vector3 llGetRootPosition() { return m_LSL_Functions.llGetRootPosition(); } - public rotation llGetRootRotation() + public LSL_Types.Quaternion llGetRootRotation() { return m_LSL_Functions.llGetRootRotation(); } @@ -1589,7 +1588,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetBoundingBox(obj); } - public vector llGetGeometricCenter() + public LSL_Types.Vector3 llGetGeometricCenter() { return m_LSL_Functions.llGetGeometricCenter(); } @@ -1622,7 +1621,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetSimulatorHostname(); } - public void llSetLocalRot(rotation rot) + public void llSetLocalRot(LSL_Types.Quaternion rot) { m_LSL_Functions.llSetLocalRot(rot); } @@ -1632,7 +1631,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llParseStringKeepNulls(src, seperators, spacers); } - public void llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, int param) + public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param) { m_LSL_Functions.llRezAtRoot(inventory, position, velocity, rot, param); } @@ -1720,12 +1719,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llSetPayPrice(price, quick_pay_buttons); } - public vector llGetCameraPos() + public LSL_Types.Vector3 llGetCameraPos() { return m_LSL_Functions.llGetCameraPos(); } - public rotation llGetCameraRot() + public LSL_Types.Quaternion llGetCameraRot() { return m_LSL_Functions.llGetCameraRot(); } @@ -1750,7 +1749,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llUnescapeURL(url); } - public void llMapDestination(string simname, vector pos, vector look_at) + public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) { m_LSL_Functions.llMapDestination(simname, pos, look_at); } @@ -1790,7 +1789,7 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetUnixTime(); } - public int llGetParcelFlags(vector pos) + public int llGetParcelFlags(LSL_Types.Vector3 pos) { return m_LSL_Functions.llGetParcelFlags(pos); } @@ -1820,12 +1819,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.llResetLandPassList(); } - public int llGetParcelPrimCount(vector pos, int category, int sim_wide) + public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) { return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); } - public LSL_Types.list llGetParcelPrimOwners(vector pos) + public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) { return m_LSL_Functions.llGetParcelPrimOwners(pos); } @@ -1838,12 +1837,12 @@ namespace OpenSim.Region.ScriptEngine.Common // // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // - public int llGetParcelMaxPrims(vector pos, int sim_wide) + public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) { return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); } - public LSL_Types.list llGetParcelDetails(vector pos, LSL_Types.list param) + public LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param) { return m_LSL_Functions.llGetParcelDetails(pos, param); } @@ -2381,7 +2380,7 @@ namespace OpenSim.Region.ScriptEngine.Common public const int OBJECT_CREATOR = 8; // Can not be public const? - public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); - public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); + public LSL_Types.Vector3 ZERO_VECTOR = new LSL_Types.Vector3(0.0, 0.0, 0.0); + public LSL_Types.Quaternion ZERO_ROTATION = new LSL_Types.Quaternion(0.0, 0, 0.0, 1.0); } } diff --git a/OpenSim/Region/ScriptEngine/Common/Executor.cs b/OpenSim/Region/ScriptEngine/Common/Executor.cs index 45f7355..8e0d6f1 100644 --- a/OpenSim/Region/ScriptEngine/Common/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Common/Executor.cs @@ -28,7 +28,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.Remoting.Lifetime; namespace OpenSim.Region.ScriptEngine.Common { diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs index 50eb56f..19fb487 100644 --- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs @@ -26,9 +26,7 @@ */ using System; -using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; -using System.Text; namespace OpenSim.Region.ScriptEngine.Common { diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index c00254d..04f8967 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -34,13 +34,12 @@ using System.Threading; using Axiom.Math; using libsecondlife; using OpenSim.Framework; -using OpenSim.Framework.Communications; +using OpenSim.Region.Environment; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Modules.LandManagement; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; -using OpenSim.Region.Environment; -using OpenSim.Region.Environment.Modules.LandManagement; + //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.Common @@ -86,7 +85,7 @@ namespace OpenSim.Region.ScriptEngine.Common } catch (AppDomainUnloadedException) { - System.Console.WriteLine("[SCRIPT]: state change called when script was unloaded. Nothing to worry about, but noting the occurance"); + Console.WriteLine("[SCRIPT]: state change called when script was unloaded. Nothing to worry about, but noting the occurance"); } } } @@ -1677,10 +1676,10 @@ namespace OpenSim.Region.ScriptEngine.Common //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); GridInstantMessage msg = new GridInstantMessage(); - msg.fromAgentID = new System.Guid(m_host.UUID.ToString()); // fromAgentID.UUID; - msg.fromAgentSession = new System.Guid(friendTransactionID.ToString());// fromAgentSession.UUID; - msg.toAgentID = new System.Guid(user); // toAgentID.UUID; - msg.imSessionID = new System.Guid(friendTransactionID.ToString()); // This is the item we're mucking with here + msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; + msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; + msg.toAgentID = new Guid(user); // toAgentID.UUID; + msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; @@ -2654,7 +2653,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return new LSL_Types.Vector3(0, 0, 0); } - if (src.Data[index].GetType() == typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3)) + if (src.Data[index].GetType() == typeof(LSL_Types.Vector3)) { return (LSL_Types.Vector3)src.Data[index]; } @@ -2675,7 +2674,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return new LSL_Types.Quaternion(0, 0, 0, 1); } - if (src.Data[index].GetType() == typeof(OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion)) + if (src.Data[index].GetType() == typeof(LSL_Types.Quaternion)) { return (LSL_Types.Quaternion)src.Data[index]; } @@ -2713,11 +2712,11 @@ namespace OpenSim.Region.ScriptEngine.Common return 0; } - if (src.Data[index] is System.Int32) + if (src.Data[index] is Int32) return 1; - if (src.Data[index] is System.Double) + if (src.Data[index] is Double) return 2; - if (src.Data[index] is System.String) + if (src.Data[index] is String) { LLUUID tuuid; if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) @@ -2729,11 +2728,11 @@ namespace OpenSim.Region.ScriptEngine.Common return 4; } } - if (src.Data[index] is OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3) + if (src.Data[index] is LSL_Types.Vector3) return 5; - if (src.Data[index] is OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion) + if (src.Data[index] is LSL_Types.Quaternion) return 6; - if (src.Data[index] is OpenSim.Region.ScriptEngine.Common.LSL_Types.list) + if (src.Data[index] is LSL_Types.list) return 7; return 0; diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 8d8e0bc..fa957bb 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs @@ -25,7 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System.Collections.Generic; +using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.ScriptEngine.Common { @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Common string State { get; set; } - OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name); + ICommander GetCommander(string name); double llSin(double f); double llCos(double f); diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 55c13a4..7a8b4ca 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -26,8 +26,8 @@ */ using System; -using System.Text.RegularExpressions; using System.Collections; +using System.Text.RegularExpressions; namespace OpenSim.Region.ScriptEngine.Common { @@ -639,7 +639,7 @@ namespace OpenSim.Region.ScriptEngine.Common public double GeometricMean() { double ret = 1.0; - list nums = list.ToDoubleList(this); + list nums = ToDoubleList(this); for (int i = 0; i < nums.Data.Length; i++) { ret *= (double)nums.Data[i]; @@ -650,7 +650,7 @@ namespace OpenSim.Region.ScriptEngine.Common public double HarmonicMean() { double ret = 0.0; - list nums = list.ToDoubleList(this); + list nums = ToDoubleList(this); for (int i = 0; i < nums.Data.Length; i++) { ret += 1.0 / (double)nums.Data[i]; @@ -661,7 +661,7 @@ namespace OpenSim.Region.ScriptEngine.Common public double Variance() { double s = 0; - list num = list.ToDoubleList(this); + list num = ToDoubleList(this); for (int i = 0; i < num.Data.Length; i++) { s += Math.Pow((double)num.Data[i], 2); @@ -701,7 +701,7 @@ namespace OpenSim.Region.ScriptEngine.Common output = "["; foreach (object o in m_data) { - if (o is System.String) + if (o is String) { output = output + "\"" + o + "\", "; } @@ -837,7 +837,7 @@ namespace OpenSim.Region.ScriptEngine.Common #region Operators - static public implicit operator System.Boolean(key k) + static public implicit operator Boolean(key k) { if (k.value.Length == 0) { @@ -864,7 +864,7 @@ namespace OpenSim.Region.ScriptEngine.Common return new key(s); } - static public implicit operator System.String(key k) + static public implicit operator String(key k) { return k.value; } @@ -917,7 +917,7 @@ namespace OpenSim.Region.ScriptEngine.Common #endregion #region Operators - static public implicit operator System.Boolean(LSLString s) + static public implicit operator Boolean(LSLString s) { if (s.m_string.Length == 0) { @@ -929,7 +929,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - static public implicit operator System.String(LSLString s) + static public implicit operator String(LSLString s) { return s.m_string; } @@ -1017,12 +1017,12 @@ namespace OpenSim.Region.ScriptEngine.Common } #endregion - static public implicit operator System.Int32(LSLInteger i) + static public implicit operator Int32(LSLInteger i) { return i.value; } - static public implicit operator System.Boolean(LSLInteger i) + static public implicit operator Boolean(LSLInteger i) { if (i.value == 0) { @@ -1086,7 +1086,7 @@ namespace OpenSim.Region.ScriptEngine.Common #region Operators - static public implicit operator System.Double(LSLFloat f) + static public implicit operator Double(LSLFloat f) { return f.value; } @@ -1097,7 +1097,7 @@ namespace OpenSim.Region.ScriptEngine.Common //} - static public implicit operator System.Boolean(LSLFloat f) + static public implicit operator Boolean(LSLFloat f) { if (f.value == 0) { diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index de19f4e..b919f8d 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -25,21 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Remoting.Lifetime; -using System.Text; -using System.Threading; using Axiom.Math; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Communications; +using Nini.Config; +using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; -using OpenSim.Region.Environment; -using OpenSim.Region.Environment.Modules.LandManagement; + //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.Common @@ -408,7 +400,7 @@ namespace OpenSim.Region.ScriptEngine.Common public bool osConsoleCommand(string command) { m_host.AddScriptLPS(1); - Nini.Config.IConfigSource config = new Nini.Config.IniConfigSource(Application.iniFilePath); + IConfigSource config = new IniConfigSource(Application.iniFilePath); if (config.Configs["LL-Functions"] == null) config.AddConfig("LL-Functions"); @@ -416,7 +408,7 @@ namespace OpenSim.Region.ScriptEngine.Common { if (World.PermissionsMngr.CanRunConsoleCommand(m_host.OwnerID)) { - OpenSim.Framework.Console.MainConsole.Instance.RunCommand(command); + MainConsole.Instance.RunCommand(command); return true; } return false; diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index 3102e3f..a4dd3b0 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.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.ScriptEngine.Common { public interface OSSL_BuilIn_Commands_Interface diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs index 41100c9..262d75f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs @@ -29,7 +29,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index a1bb5c9..7dad7ee 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs @@ -25,16 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; using Timer=OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins.Timer; @@ -50,11 +45,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public ScriptEngine m_ScriptEngine; - public AsyncCommandPlugins.Timer m_Timer; - public AsyncCommandPlugins.HttpRequest m_HttpRequest; - public AsyncCommandPlugins.Listener m_Listener; - public AsyncCommandPlugins.SensorRepeat m_SensorRepeat; - public AsyncCommandPlugins.XmlRequest m_XmlRequest; + public Timer m_Timer; + public HttpRequest m_HttpRequest; + public Listener m_Listener; + public SensorRepeat m_SensorRepeat; + public XmlRequest m_XmlRequest; public AsyncCommandManager(ScriptEngine _ScriptEngine) { @@ -81,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase cmdHandlerThread.Priority = ThreadPriority.BelowNormal; cmdHandlerThread.IsBackground = true; cmdHandlerThread.Start(); - OpenSim.Framework.ThreadTracker.Add(cmdHandlerThread); + ThreadTracker.Add(cmdHandlerThread); } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs index d62734f..521402e 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs @@ -26,16 +26,8 @@ */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs index 00cbd8c..874a905 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs @@ -25,16 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index fd8dbd1..71ae80c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs @@ -26,15 +26,10 @@ */ using System; -using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs index 63a8d19..141e471 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs @@ -28,13 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs index be4f418..c3e1804 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs @@ -26,15 +26,8 @@ */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 2f2b384..b4789a9 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it. /// [Serializable] - public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule + public class EventManager : ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule { // // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs index cd03699..7cbbd4f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs @@ -28,10 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Region.Environment.Scenes.Scripting; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index b8d950a..d77f698 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -27,11 +27,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; using libsecondlife; -using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes.Scripting; @@ -123,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase EventQueueThread.Priority = MyThreadPriority; EventQueueThread.Name = "EventQueueManagerThread_" + ThreadCount; EventQueueThread.Start(); - OpenSim.Framework.ThreadTracker.Add(EventQueueThread); + ThreadTracker.Add(EventQueueThread); // Look at this... Don't you wish everyone did that solid coding everywhere? :P if (ThreadCount == int.MaxValue) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index ad41e5b..2bf0e41 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -27,9 +27,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; +using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -94,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase MaintenanceThreadThread.Name = "ScriptMaintenanceThread"; MaintenanceThreadThread.IsBackground = true; MaintenanceThreadThread.Start(); - OpenSim.Framework.ThreadTracker.Add(MaintenanceThreadThread); + ThreadTracker.Add(MaintenanceThreadThread); } } @@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { while (true) { - System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass + Thread.Sleep(MaintenanceLoopms); // Sleep before next pass // Reset counters? if (MaintenanceLoopTicks_ScriptLoadUnload_ResetCount) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index 02e49a2..a7ad50d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs @@ -27,13 +27,11 @@ using System; using System.Collections.Generic; -using System.IO; +using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -42,9 +40,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// /// [Serializable] - public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule + public abstract class ScriptEngine : IRegionModule, ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static List ScriptEngines = new List(); public Scene World; @@ -75,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public abstract ScriptManager _GetScriptManager(); - public log4net.ILog Log + public ILog Log { get { return m_log; } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 09f84d6..cd2e530 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -32,9 +32,7 @@ using System.Reflection; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using libsecondlife; -using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -106,9 +104,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase #region Object init/shutdown - public ScriptEngineBase.ScriptEngine m_scriptEngine; + public ScriptEngine m_scriptEngine; - public ScriptManager(ScriptEngineBase.ScriptEngine scriptEngine) + public ScriptManager(ScriptEngine scriptEngine) { m_scriptEngine = scriptEngine; } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs index 4e037b3..768ba6d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.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.ScriptEngine.Common.ScriptEngineBase { public interface iScriptEngineFunctionModule diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs index 6110251..1119fe8 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs @@ -28,7 +28,6 @@ using libsecondlife; using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs index 6fe6381..14c6078 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.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.ScriptEngine.Common.TRPC { class MyBase diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs index 7689d69..624c3bb 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs @@ -25,12 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.Diagnostics; using System.Net; using System.Net.Sockets; -using System.Text; namespace OpenSim.Region.ScriptEngine.Common.TRPC { diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs index 521d75b..ab9d9b4 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs @@ -25,11 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System.Net; + namespace OpenSim.Region.ScriptEngine.Common.TRPC { public class TCPCommon { - public delegate void ClientConnectedDelegate(int ID, System.Net.EndPoint Remote); + public delegate void ClientConnectedDelegate(int ID, EndPoint Remote); public delegate void DataReceivedDelegate(int ID, byte[] data, int offset, int length); public delegate void DataSentDelegate(int ID, int length); public delegate void CloseDelegate(int ID); @@ -46,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC public interface ClientInterface : ServerAndClientInterface { - event TCPCommon.ConnectErrorDelegate ConnectError; + event ConnectErrorDelegate ConnectError; void Connect(string RemoteHost, int RemotePort); void Disconnect(int ID); } diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs index 5d1e53a..55a20e7 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs @@ -30,7 +30,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Net; using System.Net.Sockets; -using TCPCommon=OpenSim.Region.ScriptEngine.Common.TRPC.TCPCommon; namespace OpenSim.Region.ScriptEngine.Common.TRPC { diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs index 4567e60..013ae0f 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs @@ -28,7 +28,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Net; using System.Text; +using System.Web; using libsecondlife; using OpenSim.Region.ScriptEngine.Common.TRPC; @@ -41,24 +43,24 @@ namespace OpenSim.Region.ScriptEngine.Common public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); public event ReceiveCommandDelegate ReceiveCommand; - System.Collections.Generic.Dictionary TypeDictionary = new Dictionary(); + Dictionary TypeDictionary = new Dictionary(); Type[] Types = { - typeof(System.String), - typeof(System.Int16), - typeof(System.Int32), - typeof(System.Int64), - typeof(System.Double), - typeof(System.Decimal), - typeof(System.Array), + typeof(String), + typeof(Int16), + typeof(Int32), + typeof(Int64), + typeof(Double), + typeof(Decimal), + typeof(Array), typeof(LLUUID), - typeof(System.UInt16), - typeof(System.UInt32), - typeof(System.UInt64) + typeof(UInt16), + typeof(UInt32), + typeof(UInt64) }; // TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection - private System.Collections.Generic.Dictionary InQueue = new Dictionary(); + private Dictionary InQueue = new Dictionary(); private class InQueueStruct { public byte[] Queue; @@ -81,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - void TCPS_ClientConnected(int ID, System.Net.EndPoint Remote) + void TCPS_ClientConnected(int ID, EndPoint Remote) { // Create a incoming queue for this connection InQueueStruct iq = new InQueueStruct(); @@ -165,7 +167,7 @@ namespace OpenSim.Region.ScriptEngine.Common for (int i = 1; i < parts.Length; i++) { string[] spl; - spl = System.Web.HttpUtility.UrlDecode(parts[i]).Split('|'); + spl = HttpUtility.UrlDecode(parts[i]).Split('|'); string t = spl[0]; param[i - 1] = Convert.ChangeType(spl[1], TypeLookup(t)); } @@ -192,7 +194,7 @@ namespace OpenSim.Region.ScriptEngine.Common string tmpStr = Command; for (int i = 0; i < p.Length; i++) { - tmpStr += "," + p[i].GetType().ToString() + "|" + System.Web.HttpUtility.UrlEncode(p[i].ToString()); // .Replace(",", "%44") + tmpStr += "," + p[i].GetType().ToString() + "|" + HttpUtility.UrlEncode(p[i].ToString()); // .Replace(",", "%44") } tmpStr += "\n"; byte[] byteData = Encoding.ASCII.GetBytes(tmpStr); diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index e3013c9..fc38ef2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -30,10 +30,10 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Reflection; using Microsoft.CSharp; -using Microsoft.VisualBasic; using Microsoft.JScript; +using Microsoft.VisualBasic; +using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { @@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL private bool WriteScriptSourceToDebugFile; private bool CompileWithDebugInformation; private bool CleanUpOldScriptsOnStartup; - private System.Collections.Generic.Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); - private System.Collections.Generic.Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); private string FilePrefix; private string ScriptEnginesPath = "ScriptEngines"; @@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL if (enableCommanderLSL == true && l == enumCompileType.cs) { foreach (KeyValuePair com + ICommander> com in m_scriptEngine.World.GetCommanders()) { compileScript = com.Value.GenerateRuntimeAPI() + compileScript; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 20c108d..0025b26 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -26,9 +26,9 @@ * */ +using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using System; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { @@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL public string Convert(string Script) { quotes.Clear(); - string Return = System.String.Empty; + string Return = String.Empty; Script = " \r\n" + Script; // @@ -77,12 +77,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // temporarily replace quotes so we can work our magic on the script without // always considering if we are inside our outside quotes's // TODO: Does this work on half-quotes in strings? ;) - string _Script = System.String.Empty; + string _Script = String.Empty; string C; bool in_quote = false; bool quote_replaced = false; string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; - string quote = System.String.Empty; + string quote = String.Empty; bool last_was_escape = false; int quote_replaced_count = 0; for (int p = 0; p < Script.Length; p++) @@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL } else { - if (quote == System.String.Empty) + if (quote == String.Empty) { // We didn't replace quote, probably because of empty string? _Script += quote_replacement_string + @@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL quotes.Add( quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); - quote = System.String.Empty; + quote = String.Empty; } break; } @@ -155,10 +155,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // int ilevel = 0; int lastlevel = 0; - string ret = System.String.Empty; - string cache = System.String.Empty; + string ret = String.Empty; + string cache = String.Empty; bool in_state = false; - string current_statename = System.String.Empty; + string current_statename = String.Empty; for (int p = 0; p < Script.Length; p++) { C = Script.Substring(p, 1); @@ -319,9 +319,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { state_events.Add(statea, convertnametoFlag(eventa)); } - System.Console.WriteLine("State:" + statea + ", event: " + eventa); + Console.WriteLine("State:" + statea + ", event: " + eventa); } - System.Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); + Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); // Add namespace, class name and inheritance // Looking *ONLY* for state entry events diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs index 6f2dbad..99efed3 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs @@ -28,13 +28,12 @@ /* Original code: Tedd Hansen */ using System; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.ScriptEngine.DotNetEngine { [Serializable] - public class ScriptEngine : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptEngine + public class ScriptEngine : Common.ScriptEngineBase.ScriptEngine { // We need to override a few things for our DotNetEngine public override void Initialise(Scene scene, IConfigSource config) @@ -43,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine InitializeEngine(scene, config, true, GetScriptManager()); } - public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() + public override Common.ScriptEngineBase.ScriptManager _GetScriptManager() { return new ScriptManager(this); } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 05a2d06..e242748 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -34,7 +34,7 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.DotNetEngine { - public class ScriptManager : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager + public class ScriptManager : Common.ScriptEngineBase.ScriptManager { public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine) : base(scriptEngine) diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs index 54328ff..0208350 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs @@ -33,7 +33,6 @@ using System.Reflection.Emit; using System.Text; using System.Threading; using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.LSOEngine.LSO; namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { @@ -59,11 +58,11 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO string DLL_FileName = asmName.Name + ".dll"; string DLL_FileName_WithPath = Path.GetDirectoryName(LSO_FileName) + @"\" + DLL_FileName; - LSOEngine.LSO.Common.SendToLog("LSO File Name: " + Path.GetFileName(LSO_FileName)); - LSOEngine.LSO.Common.SendToLog("Assembly name: " + asmName.Name); - LSOEngine.LSO.Common.SendToLog("Assembly File Name: " + asmName.Name + ".dll"); - LSOEngine.LSO.Common.SendToLog("Starting processing of LSL ByteCode..."); - LSOEngine.LSO.Common.SendToLog(String.Empty); + Common.SendToLog("LSO File Name: " + Path.GetFileName(LSO_FileName)); + Common.SendToLog("Assembly name: " + asmName.Name); + Common.SendToLog("Assembly File Name: " + asmName.Name + ".dll"); + Common.SendToLog("Starting processing of LSL ByteCode..."); + Common.SendToLog(String.Empty); // Create Assembly @@ -104,7 +103,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO LSOP.Parse(); // Constructor has to be created AFTER LSO_Parser because of accumulated variables - if (LSOEngine.LSO.Common.IL_CreateConstructor) + if (Common.IL_CreateConstructor) IL_CREATE_CONSTRUCTOR(typeBuilder, LSOP); LSOP.CloseFile(); @@ -113,15 +112,15 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO */ - LSOEngine.LSO.Common.SendToLog("Attempting to compile assembly..."); + Common.SendToLog("Attempting to compile assembly..."); // Compile it Type type = typeBuilder.CreateType(); - LSOEngine.LSO.Common.SendToLog("Compilation successful!"); + Common.SendToLog("Compilation successful!"); - LSOEngine.LSO.Common.SendToLog("Saving assembly: " + DLL_FileName); + Common.SendToLog("Saving assembly: " + DLL_FileName); asmBuilder.Save(DLL_FileName); - LSOEngine.LSO.Common.SendToLog("Returning assembly filename: " + DLL_FileName); + Common.SendToLog("Returning assembly filename: " + DLL_FileName); return DLL_FileName; @@ -166,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO private static void IL_CREATE_CONSTRUCTOR(TypeBuilder typeBuilder, LSO_Parser LSOP) { - LSOEngine.LSO.Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); + Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); //ConstructorBuilder constructor = typeBuilder.DefineConstructor( // MethodAttributes.Public, // CallingConventions.Standard, @@ -235,7 +234,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO Type datatype = null; // Push data to stack - LSOEngine.LSO.Common.SendToDebug("Adding to static (" + pos + ") type: " + + Common.SendToDebug("Adding to static (" + pos + ") type: " + ((LSO_Enums.Variable_Type_Codes) sb.ObjectType).ToString() + " (" + sb.ObjectType + ")"); switch ((LSO_Enums.Variable_Type_Codes) sb.ObjectType) diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs index 60d68f5..6d0e35c 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs @@ -26,10 +26,6 @@ */ /* Original code: Tedd Hansen */ -using System; -using System.Reflection; -using System.Reflection.Emit; - namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { internal partial class LSO_Parser diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs index ad216aa..1b73311 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; - namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { //public partial class LSL_BaseClass diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs index a110c28..e4a57e8 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs @@ -33,7 +33,6 @@ using System.IO; using System.Reflection; using System.Reflection.Emit; using System.Text; -using OpenSim.Region.ScriptEngine.LSOEngine.LSO; namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs index 3b5ca0f..f035c03 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; using OpenSim.Region.ScriptEngine.LSOEngine.LSO; namespace OpenSim.Region.ScriptEngine.LSOEngine diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs index 8495037..3c0e9cd 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs @@ -27,18 +27,12 @@ using System; using Nini.Config; -using OpenSim.Framework.Console; -using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; -using EventManager = OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.EventManager; -using ScriptManager=OpenSim.Region.ScriptEngine.LSOEngine.ScriptManager; namespace OpenSim.Region.ScriptEngine.LSOEngine { [Serializable] - public class ScriptEngine : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptEngine + public class ScriptEngine : Common.ScriptEngineBase.ScriptEngine { // We need to override a few things for our DotNetEngine public override void Initialise(Scene scene, IConfigSource config) @@ -46,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine InitializeEngine(scene, config, true, GetScriptManager()); } - public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() + public override Common.ScriptEngineBase.ScriptManager _GetScriptManager() { return new ScriptManager(this); } diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index a933b08..0434f55 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs @@ -26,11 +26,6 @@ */ using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; using libsecondlife; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; @@ -39,7 +34,7 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.LSOEngine { - public class ScriptManager : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager + public class ScriptManager : Common.ScriptEngineBase.ScriptManager { public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine) : base(scriptEngine) diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs index 2a2f24f..603808e 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs @@ -26,8 +26,7 @@ */ using System; -using System.Collections.Generic; -using System.Text; +using System.Net.Sockets; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; @@ -61,20 +60,20 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer // Use the object if (obj.Equals(null)) { - System.Console.WriteLine("Error: unable to locate server"); + Console.WriteLine("Error: unable to locate server"); } else { return obj; } } - catch (System.Net.Sockets.SocketException) + catch (SocketException) { - System.Console.WriteLine("Error: unable to connect to server"); + Console.WriteLine("Error: unable to connect to server"); } - catch (System.Runtime.Remoting.RemotingException) + catch (RemotingException) { - System.Console.WriteLine("Error: unable to connect to server"); + Console.WriteLine("Error: unable to connect to server"); } return null; } diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index 0995afb..c33cfd1 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs @@ -28,8 +28,9 @@ /* Original code: Tedd Hansen */ using System; +using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -42,7 +43,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer [Serializable] public class ScriptEngine : IRegionModule { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); internal Scene World; internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim @@ -53,7 +54,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer Common.mySE = this; } - public log4net.ILog Log + public ILog Log { get { return m_log; } } diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index 3eaf5aa..72c10f3 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs @@ -30,10 +30,11 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; +using System.Reflection; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Console; +using log4net; using OpenSim.Data; +using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -41,7 +42,7 @@ namespace OpenSim.DataStore.MSSQL { public class MSSQLDataStore : IRegionDataStore { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private const string primSelect = "select * from prims"; private const string shapeSelect = "select * from primshapes"; diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs index ba076c2..7162758 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; - namespace libTerrain { partial class Channel -- cgit v1.1