From 72b96bcd84b92ace3155b675f074f7d0e6211da0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 17 Oct 2009 13:36:03 +0100 Subject: Add ProductName to RegionInfo (for search) --- OpenSim/Framework/RegionInfo.cs | 24 +++++++++++++++++++++++- bin/RegionConfig.ini.example | 6 ++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index d3a5357..7d71499 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -303,6 +303,7 @@ namespace OpenSim.Framework private int m_physPrimMax = 0; private bool m_clampPrimSize = false; private int m_objectCapacity = 0; + private string m_productName = String.Empty; // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. @@ -478,6 +479,11 @@ namespace OpenSim.Framework get { return (byte)Util.ConvertMaturityToAccessLevel((uint)RegionSettings.Maturity); } } + public string ProductName + { + get { return m_productName; } + } + public void SetEndPoint(string ipaddr, int port) { IPAddress tmpIP = IPAddress.Parse(ipaddr); @@ -654,8 +660,8 @@ namespace OpenSim.Framework MasterAvatarAssignedUUID = new UUID(masterAvatarUUID); + m_productName = config.GetString("ProductName", String.Empty); - // Prim stuff // m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256); @@ -721,6 +727,9 @@ namespace OpenSim.Framework if (ScopeID != UUID.Zero) config.Set("ScopeID", ScopeID.ToString()); + + if (ProductName != String.Empty) + config.Set("ProductName", ProductName); } public bool ignoreIncomingConfiguration(string configuration_key, object configuration_result) @@ -810,6 +819,9 @@ namespace OpenSim.Framework configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, "Scope ID for this region", ScopeID.ToString(), true); + + configMember.addConfigurationOption("product_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Product Name", String.Empty, true); } public void loadConfigurationOptions() @@ -873,6 +885,9 @@ namespace OpenSim.Framework configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, "Scope ID for this region", UUID.Zero.ToString(), true); + + configMember.addConfigurationOption("product_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Product Name", String.Empty, true); } public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) @@ -953,6 +968,9 @@ namespace OpenSim.Framework case "scope_id": ScopeID = (UUID)configuration_result; break; + case "product_name": + m_productName = (string)configuration_result; + break; } return true; @@ -988,6 +1006,8 @@ namespace OpenSim.Framework args["allow_alt_ports"] = OSD.FromBoolean(m_allow_alternate_ports); if ((proxyUrl != null) && !proxyUrl.Equals("")) args["proxy_url"] = OSD.FromString(proxyUrl); + if (ProductName != String.Empty) + args["product_name"] = OSD.FromString(ProductName); return args; } @@ -1035,6 +1055,8 @@ namespace OpenSim.Framework m_allow_alternate_ports = args["allow_alt_ports"].AsBoolean(); if (args["proxy_url"] != null) proxyUrl = args["proxy_url"].AsString(); + if (args["product_name"] != null) + m_productName = args["product_name"].AsString(); } public static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI) diff --git a/bin/RegionConfig.ini.example b/bin/RegionConfig.ini.example index 0404168..2767379 100644 --- a/bin/RegionConfig.ini.example +++ b/bin/RegionConfig.ini.example @@ -45,3 +45,9 @@ MasterAvatarUUID = "00000000-0000-0000-0000-000000000000" ; * ; ScopeID = "00000000-0000-0000-0000-000000000000" + +; * +; * Product name (used in search from viewer 1.23 +; * + +; ProductName = "Mainland" -- cgit v1.1