From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- OpenSim/Framework/General/Types/AgentCiruitData.cs | 3 -- OpenSim/Framework/General/Types/AgentWearable.cs | 3 -- OpenSim/Framework/General/Types/AssetBase.cs | 3 -- OpenSim/Framework/General/Types/AssetLandmark.cs | 4 +-- OpenSim/Framework/General/Types/AssetStorage.cs | 3 -- OpenSim/Framework/General/Types/EstateSettings.cs | 8 ++--- OpenSim/Framework/General/Types/Login.cs | 3 -- OpenSim/Framework/General/Types/MapBlockData.cs | 2 -- OpenSim/Framework/General/Types/NeighbourInfo.cs | 8 ----- .../Framework/General/Types/NetworkServersInfo.cs | 29 ++++++++------- OpenSim/Framework/General/Types/ParcelData.cs | 9 ++--- OpenSim/Framework/General/Types/PrimData.cs | 2 -- .../Framework/General/Types/PrimitiveBaseShape.cs | 5 --- OpenSim/Framework/General/Types/RegionHandle.cs | 2 -- OpenSim/Framework/General/Types/RegionInfo.cs | 41 +++++++++++----------- OpenSim/Framework/General/Types/UUID.cs | 2 -- 16 files changed, 40 insertions(+), 87 deletions(-) (limited to 'OpenSim/Framework/General/Types') diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs index a650343..00e9d0a 100644 --- a/OpenSim/Framework/General/Types/AgentCiruitData.cs +++ b/OpenSim/Framework/General/Types/AgentCiruitData.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs index 4c93da7..6152b7d 100644 --- a/OpenSim/Framework/General/Types/AgentWearable.cs +++ b/OpenSim/Framework/General/Types/AgentWearable.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs index 86586a6..c203f51 100644 --- a/OpenSim/Framework/General/Types/AssetBase.cs +++ b/OpenSim/Framework/General/Types/AssetBase.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs index 8a10b70..8aa872e 100644 --- a/OpenSim/Framework/General/Types/AssetLandmark.cs +++ b/OpenSim/Framework/General/Types/AssetLandmark.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; using System.Text; using libsecondlife; @@ -51,7 +49,7 @@ namespace OpenSim.Framework.Types private void InternData() { - string temp = System.Text.Encoding.UTF8.GetString(Data).Trim(); + string temp = Encoding.UTF8.GetString(Data).Trim(); string[] parts = temp.Split('\n'); int.TryParse(parts[0].Substring(17, 1), out Version); LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); diff --git a/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs index 8cac23a..3681336 100644 --- a/OpenSim/Framework/General/Types/AssetStorage.cs +++ b/OpenSim/Framework/General/Types/AssetStorage.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs index 778c893..436b109 100644 --- a/OpenSim/Framework/General/Types/EstateSettings.cs +++ b/OpenSim/Framework/General/Types/EstateSettings.cs @@ -26,10 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; - using libsecondlife; namespace OpenSim.Framework.Types @@ -46,8 +42,8 @@ namespace OpenSim.Framework.Types public int redirectGridX = 0; //?? public int redirectGridY = 0; //?? - public libsecondlife.Simulator.RegionFlags regionFlags = libsecondlife.Simulator.RegionFlags.None; //Booleam values of various region settings - public libsecondlife.Simulator.SimAccess simAccess = libsecondlife.Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. + public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings + public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. public float sunHour = 0; public float terrainRaiseLimit = 0; diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs index 3180a16..d54c019 100644 --- a/OpenSim/Framework/General/Types/Login.cs +++ b/OpenSim/Framework/General/Types/Login.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs index 2e6f56e..fbb3b73 100644 --- a/OpenSim/Framework/General/Types/MapBlockData.cs +++ b/OpenSim/Framework/General/Types/MapBlockData.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs index 310fd1c..bb67981 100644 --- a/OpenSim/Framework/General/Types/NeighbourInfo.cs +++ b/OpenSim/Framework/General/Types/NeighbourInfo.cs @@ -25,14 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using libsecondlife; - namespace OpenSim.Framework.Types { public class NeighbourInfo diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs index c6b81a7..89ebf94 100644 --- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs +++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs @@ -26,8 +26,7 @@ * */ using System; -using System.Collections.Generic; -using System.Text; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; namespace OpenSim.Framework.Types @@ -63,7 +62,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("HttpListenerPort"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); + string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); configData.SetAttribute("HttpListenerPort", location); this.HttpListenerPort = Convert.ToInt32(location); } @@ -76,7 +75,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("RemotingListenerPort"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); + string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); configData.SetAttribute("RemotingListenerPort", location); this.RemotingListenerPort = Convert.ToInt32(location); } @@ -92,7 +91,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("DefaultLocationX"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); + string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); configData.SetAttribute("DefaultLocationX", location); this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); } @@ -106,7 +105,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("DefaultLocationY"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); + string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); configData.SetAttribute("DefaultLocationY", location); this.DefaultHomeLocY = (uint)Convert.ToUInt32(location); } @@ -122,7 +121,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("GridServerURL"); if (attri == "") { - this.GridURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); + this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); configData.SetAttribute("GridServerURL", this.GridURL); } else @@ -135,7 +134,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("GridSendKey"); if (attri == "") { - this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); + this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); configData.SetAttribute("GridSendKey", this.GridSendKey); } else @@ -148,7 +147,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("GridRecvKey"); if (attri == "") { - this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); + this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); configData.SetAttribute("GridRecvKey", this.GridRecvKey); } else @@ -161,7 +160,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("UserServerURL"); if (attri == "") { - this.UserURL= OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); + this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); configData.SetAttribute("UserServerURL", this.UserURL); } else @@ -174,7 +173,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("UserSendKey"); if (attri == "") { - this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server", "null"); + this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null"); configData.SetAttribute("UserSendKey", this.UserSendKey); } else @@ -187,7 +186,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("UserRecvKey"); if (attri == "") { - this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); + this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); configData.SetAttribute("GridRecvKey", this.UserRecvKey); } else @@ -199,7 +198,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("AssetServerURL"); if (attri == "") { - this.AssetURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); + this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); configData.SetAttribute("AssetServerURL", this.GridURL); } else @@ -212,8 +211,8 @@ namespace OpenSim.Framework.Types } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } } } diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs index 40f128a..761d55e 100644 --- a/OpenSim/Framework/General/Types/ParcelData.cs +++ b/OpenSim/Framework/General/Types/ParcelData.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types @@ -45,14 +42,14 @@ namespace OpenSim.Framework.Types public int area = 0; public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID - public libsecondlife.Parcel.ParcelCategory category = new libsecondlife.Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category + public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category public int claimDate = 0; //Unemplemented public int claimPrice = 0; //Unemplemented public LLUUID groupID = new LLUUID(); //Unemplemented public int groupPrims = 0; //Unemplemented public int salePrice = 0; //Unemeplemented. Parcels price. - public libsecondlife.Parcel.ParcelStatus parcelStatus = libsecondlife.Parcel.ParcelStatus.None; - public libsecondlife.Parcel.ParcelFlags parcelFlags = libsecondlife.Parcel.ParcelFlags.None; + public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.None; + public Parcel.ParcelFlags parcelFlags = Parcel.ParcelFlags.None; public byte landingType = 0; public byte mediaAutoScale = 0; public LLUUID mediaID = LLUUID.Zero; diff --git a/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs index f84ae3e..ff81bcd 100644 --- a/OpenSim/Framework/General/Types/PrimData.cs +++ b/OpenSim/Framework/General/Types/PrimData.cs @@ -26,8 +26,6 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index 584bc9b..1357e06 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Framework.Interfaces; namespace OpenSim.Framework.Types { diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs index 1271d04..409b05a 100644 --- a/OpenSim/Framework/General/Types/RegionHandle.cs +++ b/OpenSim/Framework/General/Types/RegionHandle.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Net; namespace OpenSim.Framework.Types diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index 7b99d06..4602dcf 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs @@ -26,14 +26,13 @@ * */ using System; -using System.Collections.Generic; -using System.Text; using System.Globalization; +using System.Net; +using System.Net.Sockets; +using libsecondlife; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using libsecondlife; -using System.Net; namespace OpenSim.Framework.Types { @@ -65,7 +64,7 @@ namespace OpenSim.Framework.Types if (ia == null) ia = Adr; - if (Adr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) + if (Adr.AddressFamily == AddressFamily.InterNetwork) { ia = Adr; break; @@ -170,7 +169,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("SimLocationX"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid Location X", "1000"); + string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000"); configData.SetAttribute("SimLocationX", location); m_regionLocX = (uint)Convert.ToUInt32(location); } @@ -183,7 +182,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("SimLocationY"); if (attri == "") { - string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); + string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); configData.SetAttribute("SimLocationY", location); m_regionLocY = (uint)Convert.ToUInt32(location); } @@ -209,7 +208,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("TerrainMultiplier"); if (attri == "") { - string re = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); + string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture); configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString()); } @@ -222,7 +221,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("MasterAvatarFirstName"); if (attri == "") { - this.MasterAvatarFirstName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); + this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); } @@ -235,7 +234,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("MasterAvatarLastName"); if (attri == "") { - this.MasterAvatarLastName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); + this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); } @@ -250,7 +249,7 @@ namespace OpenSim.Framework.Types attri = configData.GetAttribute("MasterAvatarSandboxPassword"); if (attri == "") { - this.MasterAvatarSandboxPassword = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); + this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); //Should I store this? configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); @@ -265,17 +264,17 @@ namespace OpenSim.Framework.Types } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); - OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); + MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); + MainLog.Instance.Warn(e.ToString()); } - OpenSim.Framework.Console.MainLog.Instance.Verbose("Sim settings loaded:"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Name: " + this.RegionName); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); - OpenSim.Framework.Console.MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); + MainLog.Instance.Verbose("Sim settings loaded:"); + MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); + MainLog.Instance.Verbose("Name: " + this.RegionName); + MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); + MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); + MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); + MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); } diff --git a/OpenSim/Framework/General/Types/UUID.cs b/OpenSim/Framework/General/Types/UUID.cs index bb9206f..9cde18e 100644 --- a/OpenSim/Framework/General/Types/UUID.cs +++ b/OpenSim/Framework/General/Types/UUID.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Framework.Types -- cgit v1.1