From 682f4e9257bcec6e9690145760558cc3331bc5d8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 15 Apr 2008 06:21:44 +0000 Subject: * Fixes an issue with the BaseHttpServer in Linux * Fixes an estate naming issue * Fixes a land issue with the landobject not reporting the proper parcel prim. * A few other tweaks. --- OpenSim/Region/ClientStack/ClientView.cs | 2 +- OpenSim/Region/Environment/EstateManager.cs | 32 ++++++++-------- .../Environment/Modules/BetaGridLikeMoneyModule.cs | 44 ++++++++++++++++++++++ .../Modules/LandManagement/LandObject.cs | 6 +-- 4 files changed, 65 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 6ba40df..f2e48cf 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -2813,7 +2813,7 @@ namespace OpenSim.Region.ClientStack { // Keep track of when this packet was sent out Pack.TickCount = System.Environment.TickCount; - + if (!Pack.Header.Resent) { Pack.Header.Sequence = NextSeqNum(); diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index 63f2a53..ec556a6 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs @@ -289,7 +289,7 @@ namespace OpenSim.Region.Environment } //Sending Estate Settings - returnblock[0].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarFirstName + m_scene.RegionInfo.MasterAvatarLastName); + returnblock[0].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateName); returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); returnblock[2].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.estateID.ToString()); @@ -578,21 +578,22 @@ namespace OpenSim.Region.Environment { RegionInfoPacket rinfopack = new RegionInfoPacket(); RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); - - rinfoblk.BillableFactor = 0; - rinfoblk.EstateID = 02; - rinfoblk.MaxAgents = 100; - rinfoblk.ObjectBonusFactor = 1.0f; - rinfoblk.ParentEstateID = 0; - rinfoblk.PricePerMeter = 0; - rinfoblk.RedirectGridX = 0; - rinfoblk.RedirectGridY = 0; - rinfoblk.RegionFlags = (uint) m_regInfo.EstateSettings.regionFlags; + rinfopack.AgentData.AgentID = client.AgentId; + rinfopack.AgentData.SessionID = client.SessionId; + rinfoblk.BillableFactor = m_regInfo.EstateSettings.billableFactor; + rinfoblk.EstateID = m_regInfo.EstateSettings.estateID; + rinfoblk.MaxAgents = m_regInfo.EstateSettings.maxAgents; + rinfoblk.ObjectBonusFactor = m_regInfo.EstateSettings.objectBonusFactor; + rinfoblk.ParentEstateID = m_regInfo.EstateSettings.parentEstateID; + rinfoblk.PricePerMeter = m_regInfo.EstateSettings.pricePerMeter; + rinfoblk.RedirectGridX = m_regInfo.EstateSettings.redirectGridX; + rinfoblk.RedirectGridY = m_regInfo.EstateSettings.redirectGridY; + rinfoblk.RegionFlags = (uint)( m_regInfo.EstateSettings.regionFlags); rinfoblk.SimAccess = (byte) m_regInfo.EstateSettings.simAccess; rinfoblk.SunHour = m_regInfo.EstateSettings.sunHour; - rinfoblk.TerrainLowerLimit = 20; - rinfoblk.TerrainRaiseLimit = 20; - rinfoblk.UseEstateSun = true; + rinfoblk.TerrainLowerLimit = m_regInfo.EstateSettings.terrainLowerLimit; + rinfoblk.TerrainRaiseLimit = m_regInfo.EstateSettings.terrainRaiseLimit; + rinfoblk.UseEstateSun = !m_regInfo.EstateSettings.useFixedSun; rinfoblk.WaterHeight = m_regInfo.EstateSettings.waterHeight; rinfoblk.SimName = Helpers.StringToField(m_regInfo.RegionName); @@ -650,7 +651,7 @@ namespace OpenSim.Region.Environment regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.EstateSettings.pricePerMeter; regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.EstateSettings.redirectGridX; regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.EstateSettings.redirectGridY; - regionInfoPacket.RegionInfo.RegionFlags = (uint) m_regInfo.EstateSettings.regionFlags; + regionInfoPacket.RegionInfo.RegionFlags = (uint)(m_regInfo.EstateSettings.regionFlags); regionInfoPacket.RegionInfo.SimAccess = (byte) m_regInfo.EstateSettings.simAccess; regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_regInfo.RegionName); regionInfoPacket.RegionInfo.SunHour = m_regInfo.EstateSettings.sunHour; @@ -658,6 +659,7 @@ namespace OpenSim.Region.Environment regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.EstateSettings.terrainRaiseLimit; regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.EstateSettings.useFixedSun; regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.EstateSettings.waterHeight; + remote_client.OutPacket(regionInfoPacket, ThrottleOutPacketType.Task); } diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index d950af9..aef0f81 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs @@ -144,6 +144,7 @@ namespace OpenSim.Region.Environment.Modules // Centralized grid structure using OpenSimWi Redux revision 9+ // https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux scene.AddXmlRPCHandler("dynamic_balance_update_request", GridMoneyUpdate); + scene.AddXmlRPCHandler("user_alert", UserAlert); } else { @@ -1164,6 +1165,49 @@ namespace OpenSim.Region.Environment.Modules r.Value = rparms; return r; } + /// + /// XMLRPC handler to send alert message and sound to client + /// + public XmlRpcResponse UserAlert(XmlRpcRequest request) + { + XmlRpcResponse ret = new XmlRpcResponse(); + Hashtable retparam = new Hashtable(); + Hashtable requestData = (Hashtable)request.Params[0]; + + LLUUID agentId = LLUUID.Zero; + LLUUID soundId = LLUUID.Zero; + + Helpers.TryParse((string)requestData["agentId"], out agentId); + Helpers.TryParse((string)requestData["soundId"], out soundId); + string text=(string)requestData["text"]; + string secret=(string)requestData["secret"]; + + Scene userScene = GetRandomScene(); + if(userScene.RegionInfo.regionSecret.ToString() == secret) + { + IClientAPI client = LocateClientObject(agentId); + + if (client != null) + { + if(soundId != LLUUID.Zero) + client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); + client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); + retparam.Add("success", true); + } + else + { + retparam.Add("success", false); + } + } + else + { + retparam.Add("success", false); + } + ret.Value = retparam; + + return ret; + } + # region Standalone box enablers only diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs index 161434e..69d3c05 100644 --- a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs @@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement { updatePacket.ParcelData.MaxPrims = Convert.ToInt32( - Math.Round((Convert.ToDecimal(landData.area)/Convert.ToDecimal(65536))*15000* + Math.Round((Convert.ToDecimal(landData.area)/Convert.ToDecimal(65536))*m_scene.objectCapacity* Convert.ToDecimal(m_scene.RegionInfo.EstateSettings.objectBonusFactor))); } else @@ -194,7 +194,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement updatePacket.ParcelData.PassHours = landData.passHours; updatePacket.ParcelData.PassPrice = landData.passPrice; updatePacket.ParcelData.PublicCount = 0; //unemplemented - + uint regionFlags = (uint) m_scene.RegionInfo.EstateSettings.regionFlags; updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint) Simulator.RegionFlags.DenyAnonymous) > 0); @@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.LandManagement { updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32( - Math.Round((Convert.ToDecimal(landData.simwideArea)/Convert.ToDecimal(65536))*15000* + Math.Round((Convert.ToDecimal(landData.simwideArea) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * Convert.ToDecimal(m_scene.RegionInfo.EstateSettings.objectBonusFactor))); } else -- cgit v1.1