diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 8d93354391..377c680d70 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -669,10 +669,6 @@ namespace OpenSim.Data.SQLite
}
}
- ///
- ///
- ///
- ///
public void RemoveLandObject(UUID globalID)
{
lock (ds)
@@ -698,7 +694,6 @@ namespace OpenSim.Data.SQLite
if (landRow != null)
{
landRow.Delete();
- land.Rows.Remove(landRow);
}
List rowsToDelete = new List();
foreach (DataRow rowToCheck in landaccesslist.Rows)
@@ -709,7 +704,6 @@ namespace OpenSim.Data.SQLite
for (int iter = 0; iter < rowsToDelete.Count; iter++)
{
rowsToDelete[iter].Delete();
- landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
}
Commit();
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 34b2975b50..313cdcafae 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -1030,11 +1030,12 @@ namespace OpenSim
delegate(Scene scene)
{
MainConsole.Instance.Output(String.Format(
- "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}",
+ "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}",
scene.RegionInfo.RegionName,
scene.RegionInfo.RegionLocX,
scene.RegionInfo.RegionLocY,
- scene.RegionInfo.InternalEndPoint.Port));
+ scene.RegionInfo.InternalEndPoint.Port,
+ scene.RegionInfo.EstateSettings.EstateName));
});
break;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index cfcc0576ff..b7f9d87dc4 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -27,6 +27,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Sockets;
@@ -639,10 +640,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
object[] array = new object[] { buffer, packet };
- if (m_asyncPacketHandling)
- Util.FireAndForget(HandleUseCircuitCode, array);
- else
- HandleUseCircuitCode(array);
+ Util.FireAndForget(HandleUseCircuitCode, array);
return;
}
@@ -859,10 +857,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Begin the process of adding the client to the simulator
AddNewClient((UseCircuitCodePacket)packet, remoteEndPoint);
- // Acknowledge the UseCircuitCode packet
+ // Send ack
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
-
-// m_log.DebugFormat(
+
+ // m_log.DebugFormat(
// "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
// buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
}
@@ -926,25 +924,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
{
- // Create the LLUDPClient
- LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
- IClientAPI existingClient;
-
- if (!m_scene.TryGetClient(agentID, out existingClient))
+ // In priciple there shouldn't be more than one thread here, ever.
+ // But in case that happens, we need to synchronize this piece of code
+ // because it's too important
+ lock (this)
{
- // Create the LLClientView
- LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
- client.OnLogout += LogoutHandler;
+ IClientAPI existingClient;
- client.DisableFacelights = m_disableFacelights;
+ if (!m_scene.TryGetClient(agentID, out existingClient))
+ {
+ // Create the LLUDPClient
+ LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
+ // Create the LLClientView
+ LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
+ client.OnLogout += LogoutHandler;
- // Start the IClientAPI
- client.Start();
- }
- else
- {
- m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
- udpClient.AgentID, remoteEndPoint, circuitCode);
+ client.DisableFacelights = m_disableFacelights;
+
+ // Start the IClientAPI
+ client.Start();
+
+ }
+ else
+ {
+ m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
+ existingClient.AgentId, remoteEndPoint, circuitCode);
+ }
}
}
@@ -1055,6 +1060,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Update Timers
+ // Use this for emergency monitoring -- bug hunting
+ //if (m_scene.EmergencyMonitoring)
+ // clientPacketHandler = MonitoredClientOutgoingPacketHandler;
+ //else
+ // clientPacketHandler = ClientOutgoingPacketHandler;
+
// Handle outgoing packets, resends, acknowledgements, and pings for each
// client. m_packetSent will be set to true if a packet is sent
m_scene.ForEachClient(clientPacketHandler);
@@ -1070,6 +1081,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex);
}
+
}
Watchdog.RemoveThread();
@@ -1107,6 +1119,112 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
+ #region Emergency Monitoring
+ // Alternative packet handler fuull of instrumentation
+ // Handy for hunting bugs
+ private Stopwatch watch1 = new Stopwatch();
+ private Stopwatch watch2 = new Stopwatch();
+
+ private float avgProcessingTicks = 0;
+ private float avgResendUnackedTicks = 0;
+ private float avgSendAcksTicks = 0;
+ private float avgSendPingTicks = 0;
+ private float avgDequeueTicks = 0;
+ private long nticks = 0;
+ private long nticksUnack = 0;
+ private long nticksAck = 0;
+ private long nticksPing = 0;
+ private int npacksSent = 0;
+ private int npackNotSent = 0;
+
+ private void MonitoredClientOutgoingPacketHandler(IClientAPI client)
+ {
+ nticks++;
+ watch1.Start();
+ try
+ {
+ if (client is LLClientView)
+ {
+ LLUDPClient udpClient = ((LLClientView)client).UDPClient;
+
+ if (udpClient.IsConnected)
+ {
+ if (m_resendUnacked)
+ {
+ nticksUnack++;
+ watch2.Start();
+
+ ResendUnacked(udpClient);
+
+ watch2.Stop();
+ avgResendUnackedTicks = (nticksUnack - 1)/(float)nticksUnack * avgResendUnackedTicks + (watch2.ElapsedTicks / (float)nticksUnack);
+ watch2.Reset();
+ }
+
+ if (m_sendAcks)
+ {
+ nticksAck++;
+ watch2.Start();
+
+ SendAcks(udpClient);
+
+ watch2.Stop();
+ avgSendAcksTicks = (nticksAck - 1) / (float)nticksAck * avgSendAcksTicks + (watch2.ElapsedTicks / (float)nticksAck);
+ watch2.Reset();
+ }
+
+ if (m_sendPing)
+ {
+ nticksPing++;
+ watch2.Start();
+
+ SendPing(udpClient);
+
+ watch2.Stop();
+ avgSendPingTicks = (nticksPing - 1) / (float)nticksPing * avgSendPingTicks + (watch2.ElapsedTicks / (float)nticksPing);
+ watch2.Reset();
+ }
+
+ watch2.Start();
+ // Dequeue any outgoing packets that are within the throttle limits
+ if (udpClient.DequeueOutgoing())
+ {
+ m_packetSent = true;
+ npacksSent++;
+ }
+ else
+ npackNotSent++;
+
+ watch2.Stop();
+ avgDequeueTicks = (nticks - 1) / (float)nticks * avgDequeueTicks + (watch2.ElapsedTicks / (float)nticks);
+ watch2.Reset();
+
+ }
+ else
+ m_log.WarnFormat("[LLUDPSERVER]: Client is not connected");
+ }
+ }
+ catch (Exception ex)
+ {
+ m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler iteration for " + client.Name +
+ " threw an exception: " + ex.Message, ex);
+ }
+ watch1.Stop();
+ avgProcessingTicks = (nticks - 1) / (float)nticks * avgProcessingTicks + (watch1.ElapsedTicks / (float)nticks);
+ watch1.Reset();
+
+ // reuse this -- it's every ~100ms
+ if (m_scene.EmergencyMonitoring && nticks % 100 == 0)
+ {
+ m_log.InfoFormat("[LLUDPSERVER]: avg processing ticks: {0} avg unacked: {1} avg acks: {2} avg ping: {3} avg dequeue: {4} (TickCountRes: {5} sent: {6} notsent: {7})",
+ avgProcessingTicks, avgResendUnackedTicks, avgSendAcksTicks, avgSendPingTicks, avgDequeueTicks, TickCountResolution, npacksSent, npackNotSent);
+ npackNotSent = npacksSent = 0;
+ }
+
+ }
+
+ #endregion
+
private void ProcessInPacket(object state)
{
IncomingPacket incomingPacket = (IncomingPacket)state;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
index d762bef134..d195110a23 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs
@@ -141,46 +141,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessQueues()
{
// Process all the pending adds
-
OutgoingPacket pendingAdd;
- if (m_pendingAdds != null)
- {
- while (m_pendingAdds.TryDequeue(out pendingAdd))
- {
- if (pendingAdd != null && m_packets != null)
- {
- m_packets[pendingAdd.SequenceNumber] = pendingAdd;
- }
- }
- }
+ while (m_pendingAdds.TryDequeue(out pendingAdd))
+ if (pendingAdd != null)
+ m_packets[pendingAdd.SequenceNumber] = pendingAdd;
// Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove;
OutgoingPacket ackedPacket;
- if (m_pendingRemoves != null)
+ while (m_pendingRemoves.TryDequeue(out pendingRemove))
{
- while (m_pendingRemoves.TryDequeue(out pendingRemove))
+ if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
{
- if (m_pendingRemoves != null && m_packets != null)
+ if (ackedPacket != null)
{
- if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
+ m_packets.Remove(pendingRemove.SequenceNumber);
+
+ // Update stats
+ Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
+
+ if (!pendingRemove.FromResend)
{
- m_packets.Remove(pendingRemove.SequenceNumber);
-
- // Update stats
- Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
-
- if (!pendingRemove.FromResend)
- {
- // Calculate the round-trip time for this packet and its ACK
- int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
- if (rtt > 0)
- ackedPacket.Client.UpdateRoundTrip(rtt);
- }
+ // Calculate the round-trip time for this packet and its ACK
+ int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
+ if (rtt > 0)
+ ackedPacket.Client.UpdateRoundTrip(rtt);
}
}
}
}
}
}
-}
+}
\ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index 01a2615dc0..66994facff 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
if (scene != null)
{
- UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, userID);
+ UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
isAuthorized = IsAuthorizedForRegion(userID, account.FirstName, account.LastName,
account.Email, scene.RegionInfo.RegionName, regionID, out message);
}
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
new file mode 100644
index 0000000000..14f5b1ef94
--- /dev/null
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Security;
+using log4net;
+using Nini.Config;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+
+namespace OpenSim.Region.CoreModules.World.Estate
+{
+ public class EstateManagementCommands
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ protected EstateManagementModule m_module;
+
+ public EstateManagementCommands(EstateManagementModule module)
+ {
+ m_module = module;
+ }
+
+ public void Initialise()
+ {
+ m_module.Scene.AddCommand(this, "set terrain texture",
+ "set terrain texture [] []",
+ "Sets the terrain to , if or are specified, it will only " +
+ "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
+ " that coordinate.",
+ consoleSetTerrainTexture);
+
+ m_module.Scene.AddCommand(this, "set terrain heights",
+ "set terrain heights [] []",
+ "Sets the terrain texture heights on corner # to /, if or are specified, it will only " +
+ "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
+ " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.",
+ consoleSetTerrainHeights);
+ }
+
+ protected void consoleSetTerrainTexture(string module, string[] args)
+ {
+ string num = args[3];
+ string uuid = args[4];
+ int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
+ int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
+
+ if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
+ {
+ if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
+ {
+ int corner = int.Parse(num);
+ UUID texture = UUID.Parse(uuid);
+
+ m_log.Debug("[ESTATEMODULE]: Setting terrain textures for " + m_module.Scene.RegionInfo.RegionName +
+ string.Format(" (C#{0} = {1})", corner, texture));
+
+ switch (corner)
+ {
+ case 0:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
+ break;
+ case 1:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
+ break;
+ case 2:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
+ break;
+ case 3:
+ m_module.Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
+ break;
+ }
+
+ m_module.Scene.RegionInfo.RegionSettings.Save();
+ m_module.TriggerRegionInfoChange();
+ m_module.sendRegionInfoPacketToAll();
+ }
+ }
+ }
+
+ protected void consoleSetTerrainHeights(string module, string[] args)
+ {
+ string num = args[3];
+ string min = args[4];
+ string max = args[5];
+ int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
+ int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
+
+ if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
+ {
+ if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
+ {
+ int corner = int.Parse(num);
+ float lowValue = float.Parse(min, Culture.NumberFormatInfo);
+ float highValue = float.Parse(max, Culture.NumberFormatInfo);
+
+ m_log.Debug("[ESTATEMODULE]: Setting terrain heights " + m_module.Scene.RegionInfo.RegionName +
+ string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));
+
+ switch (corner)
+ {
+ case 0:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
+ break;
+ case 1:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
+ break;
+ case 2:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
+ break;
+ case 3:
+ m_module.Scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
+ m_module.Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
+ break;
+ }
+
+ m_module.Scene.RegionInfo.RegionSettings.Save();
+ m_module.TriggerRegionInfoChange();
+ m_module.sendRegionHandshakeToAll();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 36538429c9..0652ca79fb 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
using System;
using System.Collections.Generic;
using System.IO;
@@ -45,8 +46,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
private delegate void LookupUUIDS(List uuidLst);
- private Scene m_scene;
private Timer m_regionChangeTimer = new Timer();
+ public Scene Scene { get; private set; }
+
+ protected EstateManagementCommands m_commands;
private EstateTerrainXferHandler TerrainUploader;
@@ -60,89 +63,89 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
uint sun = 0;
- if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
- sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800;
+ if (!Scene.RegionInfo.EstateSettings.UseGlobalTime)
+ sun = (uint)(Scene.RegionInfo.EstateSettings.SunPosition * 1024.0) + 0x1800;
UUID estateOwner;
- estateOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
+ estateOwner = Scene.RegionInfo.EstateSettings.EstateOwner;
- if (m_scene.Permissions.IsGod(remote_client.AgentId))
+ if (Scene.Permissions.IsGod(remote_client.AgentId))
estateOwner = remote_client.AgentId;
remote_client.SendDetailedEstateData(invoice,
- m_scene.RegionInfo.EstateSettings.EstateName,
- m_scene.RegionInfo.EstateSettings.EstateID,
- m_scene.RegionInfo.EstateSettings.ParentEstateID,
+ Scene.RegionInfo.EstateSettings.EstateName,
+ Scene.RegionInfo.EstateSettings.EstateID,
+ Scene.RegionInfo.EstateSettings.ParentEstateID,
GetEstateFlags(),
sun,
- m_scene.RegionInfo.RegionSettings.Covenant,
- m_scene.RegionInfo.EstateSettings.AbuseEmail,
+ Scene.RegionInfo.RegionSettings.Covenant,
+ Scene.RegionInfo.EstateSettings.AbuseEmail,
estateOwner);
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.EstateManagers,
- m_scene.RegionInfo.EstateSettings.EstateManagers,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateManagers,
+ Scene.RegionInfo.EstateSettings.EstateID);
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.AccessOptions,
- m_scene.RegionInfo.EstateSettings.EstateAccess,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateAccess,
+ Scene.RegionInfo.EstateSettings.EstateID);
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.AllowedGroups,
- m_scene.RegionInfo.EstateSettings.EstateGroups,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateGroups,
+ Scene.RegionInfo.EstateSettings.EstateID);
remote_client.SendBannedUserList(invoice,
- m_scene.RegionInfo.EstateSettings.EstateBans,
- m_scene.RegionInfo.EstateSettings.EstateID);
+ Scene.RegionInfo.EstateSettings.EstateBans,
+ Scene.RegionInfo.EstateSettings.EstateID);
}
private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
int matureLevel, bool restrictPushObject, bool allowParcelChanges)
{
if (blockTerraform)
- m_scene.RegionInfo.RegionSettings.BlockTerraform = true;
+ Scene.RegionInfo.RegionSettings.BlockTerraform = true;
else
- m_scene.RegionInfo.RegionSettings.BlockTerraform = false;
+ Scene.RegionInfo.RegionSettings.BlockTerraform = false;
if (noFly)
- m_scene.RegionInfo.RegionSettings.BlockFly = true;
+ Scene.RegionInfo.RegionSettings.BlockFly = true;
else
- m_scene.RegionInfo.RegionSettings.BlockFly = false;
+ Scene.RegionInfo.RegionSettings.BlockFly = false;
if (allowDamage)
- m_scene.RegionInfo.RegionSettings.AllowDamage = true;
+ Scene.RegionInfo.RegionSettings.AllowDamage = true;
else
- m_scene.RegionInfo.RegionSettings.AllowDamage = false;
+ Scene.RegionInfo.RegionSettings.AllowDamage = false;
if (blockLandResell)
- m_scene.RegionInfo.RegionSettings.AllowLandResell = false;
+ Scene.RegionInfo.RegionSettings.AllowLandResell = false;
else
- m_scene.RegionInfo.RegionSettings.AllowLandResell = true;
+ Scene.RegionInfo.RegionSettings.AllowLandResell = true;
- m_scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
+ Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
- m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
+ Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
if (matureLevel <= 13)
- m_scene.RegionInfo.RegionSettings.Maturity = 0;
+ Scene.RegionInfo.RegionSettings.Maturity = 0;
else if (matureLevel <= 21)
- m_scene.RegionInfo.RegionSettings.Maturity = 1;
+ Scene.RegionInfo.RegionSettings.Maturity = 1;
else
- m_scene.RegionInfo.RegionSettings.Maturity = 2;
+ Scene.RegionInfo.RegionSettings.Maturity = 2;
if (restrictPushObject)
- m_scene.RegionInfo.RegionSettings.RestrictPushing = true;
+ Scene.RegionInfo.RegionSettings.RestrictPushing = true;
else
- m_scene.RegionInfo.RegionSettings.RestrictPushing = false;
+ Scene.RegionInfo.RegionSettings.RestrictPushing = false;
if (allowParcelChanges)
- m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true;
+ Scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true;
else
- m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false;
+ Scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false;
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
@@ -156,19 +159,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
switch (corner)
{
case 0:
- m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
break;
case 1:
- m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
break;
case 2:
- m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
break;
case 3:
- m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
+ Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
break;
}
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
}
@@ -178,23 +181,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
switch (corner)
{
case 0:
- m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
break;
case 1:
- m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
break;
case 2:
- m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
break;
case 3:
- m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
+ Scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
+ Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
break;
}
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
}
@@ -210,30 +213,30 @@ namespace OpenSim.Region.CoreModules.World.Estate
bool UseGlobal, bool EstateFixedSun, float EstateSunHour)
{
// Water Height
- m_scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight;
+ Scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight;
// Terraforming limits
- m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit;
- m_scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit;
+ Scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit;
+ Scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit;
// Time of day / fixed sun
- m_scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun;
- m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
- m_scene.RegionInfo.RegionSettings.SunPosition = SunHour;
+ Scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun;
+ Scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
+ Scene.RegionInfo.RegionSettings.SunPosition = SunHour;
- m_scene.TriggerEstateSunUpdate();
+ Scene.TriggerEstateSunUpdate();
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
//m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
sendRegionInfoPacketToAll();
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
}
private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
{
- IRestartModule restartModule = m_scene.RequestModuleInterface();
+ IRestartModule restartModule = Scene.RequestModuleInterface();
if (restartModule != null)
{
List times = new List();
@@ -254,8 +257,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
{
- m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
}
@@ -263,17 +266,17 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
// EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
- if (user == m_scene.RegionInfo.EstateSettings.EstateOwner)
+ if (user == Scene.RegionInfo.EstateSettings.EstateOwner)
return; // never process EO
if ((estateAccessType & 4) != 0) // User add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.AddEstateUser(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddEstateUser(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -283,13 +286,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 8) != 0) // User remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -298,12 +301,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 16) != 0) // Group add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.AddEstateGroup(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddEstateGroup(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -312,13 +315,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 32) != 0) // Group remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -327,9 +330,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 64) != 0) // Ban add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions())
{
- EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
+ EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans;
bool alreadyInList = false;
@@ -348,20 +351,20 @@ namespace OpenSim.Region.CoreModules.World.Estate
EstateBan item = new EstateBan();
item.BannedUserID = user;
- item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID;
+ item.EstateID = Scene.RegionInfo.EstateSettings.EstateID;
item.BannedHostAddress = "0.0.0.0";
item.BannedHostIPMask = "0.0.0.0";
- m_scene.RegionInfo.EstateSettings.AddBan(item);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddBan(item);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- ScenePresence s = m_scene.GetScenePresence(user);
+ ScenePresence s = Scene.GetScenePresence(user);
if (s != null)
{
if (!s.IsChildAgent)
{
- if (!m_scene.TeleportClientHome(user, s.ControllingClient))
+ if (!Scene.TeleportClientHome(user, s.ControllingClient))
{
s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out.");
s.ControllingClient.Close();
@@ -375,7 +378,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
remote_client.SendAlertMessage("User is already on the region ban list");
}
//m_scene.RegionInfo.regionBanlist.Add(Manager(user);
- remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendBannedUserList(invoice, Scene.RegionInfo.EstateSettings.EstateBans, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -384,9 +387,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 128) != 0) // Ban remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions())
{
- EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans;
+ EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans;
bool alreadyInList = false;
EstateBan listitem = null;
@@ -399,20 +402,21 @@ namespace OpenSim.Region.CoreModules.World.Estate
listitem = banlistcheck[i];
break;
}
-
}
+
if (alreadyInList && listitem != null)
{
- m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
}
else
{
remote_client.SendAlertMessage("User is not on the region ban list");
}
+
//m_scene.RegionInfo.regionBanlist.Add(Manager(user);
- remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendBannedUserList(invoice, Scene.RegionInfo.EstateSettings.EstateBans, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -421,12 +425,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 256) != 0) // Manager add
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.AddEstateManager(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.AddEstateManager(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -435,13 +439,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 512) != 0) // Manager remove
{
- if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
+ if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
{
- m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID);
+ remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID);
}
else
{
@@ -453,7 +457,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void SendSimulatorBlueBoxMessage(
IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
{
- IDialogModule dm = m_scene.RequestModuleInterface();
+ IDialogModule dm = Scene.RequestModuleInterface();
if (dm != null)
dm.SendNotificationToUsersInRegion(senderID, senderName, message);
@@ -468,38 +472,38 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics)
{
if (physics)
- m_scene.RegionInfo.RegionSettings.DisablePhysics = true;
+ Scene.RegionInfo.RegionSettings.DisablePhysics = true;
else
- m_scene.RegionInfo.RegionSettings.DisablePhysics = false;
+ Scene.RegionInfo.RegionSettings.DisablePhysics = false;
if (scripted)
- m_scene.RegionInfo.RegionSettings.DisableScripts = true;
+ Scene.RegionInfo.RegionSettings.DisableScripts = true;
else
- m_scene.RegionInfo.RegionSettings.DisableScripts = false;
+ Scene.RegionInfo.RegionSettings.DisableScripts = false;
if (collisionEvents)
- m_scene.RegionInfo.RegionSettings.DisableCollisions = true;
+ Scene.RegionInfo.RegionSettings.DisableCollisions = true;
else
- m_scene.RegionInfo.RegionSettings.DisableCollisions = false;
+ Scene.RegionInfo.RegionSettings.DisableCollisions = false;
- m_scene.RegionInfo.RegionSettings.Save();
+ Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
- m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
+ Scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
}
private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey)
{
- if (!m_scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
+ if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
return;
if (prey != UUID.Zero)
{
- ScenePresence s = m_scene.GetScenePresence(prey);
+ ScenePresence s = Scene.GetScenePresence(prey);
if (s != null)
{
- if (!m_scene.TeleportClientHome(prey, s.ControllingClient))
+ if (!Scene.TeleportClientHome(prey, s.ControllingClient))
{
s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
s.ControllingClient.Close();
@@ -510,19 +514,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
{
- if (!m_scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
+ if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
return;
- m_scene.ForEachScenePresence(delegate(ScenePresence sp)
+ Scene.ForEachScenePresence(delegate(ScenePresence sp)
{
if (sp.UUID != senderID)
{
- ScenePresence p = m_scene.GetScenePresence(sp.UUID);
+ ScenePresence p = Scene.GetScenePresence(sp.UUID);
// make sure they are still there, we could be working down a long list
// Also make sure they are actually in the region
if (p != null && !p.IsChildAgent)
{
- if (!m_scene.TeleportClientHome(p.UUID, p.ControllingClient))
+ if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient))
{
p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
p.ControllingClient.Close();
@@ -531,6 +535,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
});
}
+
private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID)
{
if (TerrainUploader != null)
@@ -561,11 +566,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
TerrainUploader = null;
}
remoteClient.SendAlertMessage("Terrain Upload Complete. Loading....");
- ITerrainModule terr = m_scene.RequestModuleInterface();
+ ITerrainModule terr = Scene.RequestModuleInterface();
if (terr != null)
{
- m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName);
+ m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
try
{
@@ -611,7 +616,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void handleUploadTerrain(IClientAPI remote_client, string clientFileName)
{
-
if (TerrainUploader == null)
{
@@ -629,16 +633,16 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
remote_client.SendAlertMessage("Another Terrain Upload is in progress. Please wait your turn!");
}
-
}
+
private void handleTerrainRequest(IClientAPI remote_client, string clientFileName)
{
// Save terrain here
- ITerrainModule terr = m_scene.RequestModuleInterface();
+ ITerrainModule terr = Scene.RequestModuleInterface();
if (terr != null)
{
- m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName);
+ m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
if (File.Exists(Util.dataDir() + "/terrain.raw"))
{
File.Delete(Util.dataDir() + "/terrain.raw");
@@ -649,7 +653,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
byte[] bdata = new byte[input.Length];
input.Read(bdata, 0, (int)input.Length);
remote_client.SendAlertMessage("Terrain file written, starting download...");
- m_scene.XferManager.AddNewFile("terrain.raw", bdata);
+ Scene.XferManager.AddNewFile("terrain.raw", bdata);
// Tell client about it
m_log.Warn("[CLIENT]: Sending Terrain to " + remote_client.Name);
remote_client.SendInitiateDownload("terrain.raw", clientFileName);
@@ -659,35 +663,35 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void HandleRegionInfoRequest(IClientAPI remote_client)
{
RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
- args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor;
- args.estateID = m_scene.RegionInfo.EstateSettings.EstateID;
- args.maxAgents = (byte)m_scene.RegionInfo.RegionSettings.AgentLimit;
- args.objectBonusFactor = (float)m_scene.RegionInfo.RegionSettings.ObjectBonus;
- args.parentEstateID = m_scene.RegionInfo.EstateSettings.ParentEstateID;
- args.pricePerMeter = m_scene.RegionInfo.EstateSettings.PricePerMeter;
- args.redirectGridX = m_scene.RegionInfo.EstateSettings.RedirectGridX;
- args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY;
+ args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
+ args.estateID = Scene.RegionInfo.EstateSettings.EstateID;
+ args.maxAgents = (byte)Scene.RegionInfo.RegionSettings.AgentLimit;
+ args.objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus;
+ args.parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID;
+ args.pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter;
+ args.redirectGridX = Scene.RegionInfo.EstateSettings.RedirectGridX;
+ args.redirectGridY = Scene.RegionInfo.EstateSettings.RedirectGridY;
args.regionFlags = GetRegionFlags();
- args.simAccess = m_scene.RegionInfo.AccessLevel;
- args.sunHour = (float)m_scene.RegionInfo.RegionSettings.SunPosition;
- args.terrainLowerLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit;
- args.terrainRaiseLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit;
- args.useEstateSun = m_scene.RegionInfo.RegionSettings.UseEstateSun;
- args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
- args.simName = m_scene.RegionInfo.RegionName;
- args.regionType = m_scene.RegionInfo.RegionType;
+ args.simAccess = Scene.RegionInfo.AccessLevel;
+ args.sunHour = (float)Scene.RegionInfo.RegionSettings.SunPosition;
+ args.terrainLowerLimit = (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit;
+ args.terrainRaiseLimit = (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit;
+ args.useEstateSun = Scene.RegionInfo.RegionSettings.UseEstateSun;
+ args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
+ args.simName = Scene.RegionInfo.RegionName;
+ args.regionType = Scene.RegionInfo.RegionType;
remote_client.SendRegionInfoToEstateMenu(args);
}
private void HandleEstateCovenantRequest(IClientAPI remote_client)
{
- remote_client.SendEstateCovenantInformation(m_scene.RegionInfo.RegionSettings.Covenant);
+ remote_client.SendEstateCovenantInformation(Scene.RegionInfo.RegionSettings.Covenant);
}
private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient)
{
- if (!m_scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, false))
+ if (!Scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, false))
return;
Dictionary SceneData = new Dictionary();
@@ -695,11 +699,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
if (reportType == 1)
{
- SceneData = m_scene.PhysicsScene.GetTopColliders();
+ SceneData = Scene.PhysicsScene.GetTopColliders();
}
else if (reportType == 0)
{
- SceneData = m_scene.SceneGraph.GetTopScripts();
+ SceneData = Scene.SceneGraph.GetTopScripts();
}
List SceneReport = new List();
@@ -707,7 +711,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
foreach (uint obj in SceneData.Keys)
{
- SceneObjectPart prt = m_scene.GetSceneObjectPart(obj);
+ SceneObjectPart prt = Scene.GetSceneObjectPart(obj);
if (prt != null)
{
if (prt.ParentGroup != null)
@@ -779,7 +783,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
// string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]);
- IUserManagement userManager = m_scene.RequestModuleInterface();
+ IUserManagement userManager = Scene.RequestModuleInterface();
if (userManager != null)
userManager.GetUserName(uuidarr[i]);
@@ -794,7 +798,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void sendRegionInfoPacketToAll()
{
- m_scene.ForEachScenePresence(delegate(ScenePresence sp)
+ Scene.ForEachScenePresence(delegate(ScenePresence sp)
{
if (!sp.IsChildAgent)
HandleRegionInfoRequest(sp.ControllingClient);
@@ -805,99 +809,99 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
RegionHandshakeArgs args = new RegionHandshakeArgs();
- args.isEstateManager = m_scene.RegionInfo.EstateSettings.IsEstateManager(remoteClient.AgentId);
- if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero && m_scene.RegionInfo.EstateSettings.EstateOwner == remoteClient.AgentId)
+ args.isEstateManager = Scene.RegionInfo.EstateSettings.IsEstateManager(remoteClient.AgentId);
+ if (Scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero && Scene.RegionInfo.EstateSettings.EstateOwner == remoteClient.AgentId)
args.isEstateManager = true;
- args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor;
- args.terrainStartHeight0 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SW;
- args.terrainHeightRange0 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SW;
- args.terrainStartHeight1 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NW;
- args.terrainHeightRange1 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NW;
- args.terrainStartHeight2 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SE;
- args.terrainHeightRange2 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SE;
- args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE;
- args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE;
- args.simAccess = m_scene.RegionInfo.AccessLevel;
- args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
+ args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
+ args.terrainStartHeight0 = (float)Scene.RegionInfo.RegionSettings.Elevation1SW;
+ args.terrainHeightRange0 = (float)Scene.RegionInfo.RegionSettings.Elevation2SW;
+ args.terrainStartHeight1 = (float)Scene.RegionInfo.RegionSettings.Elevation1NW;
+ args.terrainHeightRange1 = (float)Scene.RegionInfo.RegionSettings.Elevation2NW;
+ args.terrainStartHeight2 = (float)Scene.RegionInfo.RegionSettings.Elevation1SE;
+ args.terrainHeightRange2 = (float)Scene.RegionInfo.RegionSettings.Elevation2SE;
+ args.terrainStartHeight3 = (float)Scene.RegionInfo.RegionSettings.Elevation1NE;
+ args.terrainHeightRange3 = (float)Scene.RegionInfo.RegionSettings.Elevation2NE;
+ args.simAccess = Scene.RegionInfo.AccessLevel;
+ args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
args.regionFlags = GetRegionFlags();
- args.regionName = m_scene.RegionInfo.RegionName;
- args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
+ args.regionName = Scene.RegionInfo.RegionName;
+ args.SimOwner = Scene.RegionInfo.EstateSettings.EstateOwner;
args.terrainBase0 = UUID.Zero;
args.terrainBase1 = UUID.Zero;
args.terrainBase2 = UUID.Zero;
args.terrainBase3 = UUID.Zero;
- args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1;
- args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2;
- args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3;
- args.terrainDetail3 = m_scene.RegionInfo.RegionSettings.TerrainTexture4;
+ args.terrainDetail0 = Scene.RegionInfo.RegionSettings.TerrainTexture1;
+ args.terrainDetail1 = Scene.RegionInfo.RegionSettings.TerrainTexture2;
+ args.terrainDetail2 = Scene.RegionInfo.RegionSettings.TerrainTexture3;
+ args.terrainDetail3 = Scene.RegionInfo.RegionSettings.TerrainTexture4;
- remoteClient.SendRegionHandshake(m_scene.RegionInfo,args);
+ remoteClient.SendRegionHandshake(Scene.RegionInfo,args);
}
public void sendRegionHandshakeToAll()
{
- m_scene.ForEachClient(sendRegionHandshake);
+ Scene.ForEachClient(sendRegionHandshake);
}
public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
{
if (parms2 == 0)
{
- m_scene.RegionInfo.EstateSettings.UseGlobalTime = true;
- m_scene.RegionInfo.EstateSettings.SunPosition = 0.0;
+ Scene.RegionInfo.EstateSettings.UseGlobalTime = true;
+ Scene.RegionInfo.EstateSettings.SunPosition = 0.0;
}
else
{
- m_scene.RegionInfo.EstateSettings.UseGlobalTime = false;
- m_scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0;
+ Scene.RegionInfo.EstateSettings.UseGlobalTime = false;
+ Scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0;
}
if ((parms1 & 0x00000010) != 0)
- m_scene.RegionInfo.EstateSettings.FixedSun = true;
+ Scene.RegionInfo.EstateSettings.FixedSun = true;
else
- m_scene.RegionInfo.EstateSettings.FixedSun = false;
+ Scene.RegionInfo.EstateSettings.FixedSun = false;
if ((parms1 & 0x00008000) != 0)
- m_scene.RegionInfo.EstateSettings.PublicAccess = true;
+ Scene.RegionInfo.EstateSettings.PublicAccess = true;
else
- m_scene.RegionInfo.EstateSettings.PublicAccess = false;
+ Scene.RegionInfo.EstateSettings.PublicAccess = false;
if ((parms1 & 0x10000000) != 0)
- m_scene.RegionInfo.EstateSettings.AllowVoice = true;
+ Scene.RegionInfo.EstateSettings.AllowVoice = true;
else
- m_scene.RegionInfo.EstateSettings.AllowVoice = false;
+ Scene.RegionInfo.EstateSettings.AllowVoice = false;
if ((parms1 & 0x00100000) != 0)
- m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true;
+ Scene.RegionInfo.EstateSettings.AllowDirectTeleport = true;
else
- m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false;
+ Scene.RegionInfo.EstateSettings.AllowDirectTeleport = false;
if ((parms1 & 0x00800000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyAnonymous = true;
+ Scene.RegionInfo.EstateSettings.DenyAnonymous = true;
else
- m_scene.RegionInfo.EstateSettings.DenyAnonymous = false;
+ Scene.RegionInfo.EstateSettings.DenyAnonymous = false;
if ((parms1 & 0x01000000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyIdentified = true;
+ Scene.RegionInfo.EstateSettings.DenyIdentified = true;
else
- m_scene.RegionInfo.EstateSettings.DenyIdentified = false;
+ Scene.RegionInfo.EstateSettings.DenyIdentified = false;
if ((parms1 & 0x02000000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyTransacted = true;
+ Scene.RegionInfo.EstateSettings.DenyTransacted = true;
else
- m_scene.RegionInfo.EstateSettings.DenyTransacted = false;
+ Scene.RegionInfo.EstateSettings.DenyTransacted = false;
if ((parms1 & 0x40000000) != 0)
- m_scene.RegionInfo.EstateSettings.DenyMinors = true;
+ Scene.RegionInfo.EstateSettings.DenyMinors = true;
else
- m_scene.RegionInfo.EstateSettings.DenyMinors = false;
+ Scene.RegionInfo.EstateSettings.DenyMinors = false;
- m_scene.RegionInfo.EstateSettings.Save();
+ Scene.RegionInfo.EstateSettings.Save();
TriggerEstateInfoChange();
- m_scene.TriggerEstateSunUpdate();
+ Scene.TriggerEstateSunUpdate();
sendDetailedEstateData(remoteClient, invoice);
}
@@ -907,124 +911,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
#region IRegionModule Members
public void Initialise(Scene scene, IConfigSource source)
- {
- m_scene = scene;
- m_scene.RegisterModuleInterface(this);
- m_scene.EventManager.OnNewClient += EventManager_OnNewClient;
- m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
+ {
m_regionChangeTimer.AutoReset = false;
m_regionChangeTimer.Interval = 2000;
m_regionChangeTimer.Elapsed += RaiseRegionInfoChange;
- m_scene.AddCommand(this, "set terrain texture",
- "set terrain texture [] []",
- "Sets the terrain to , if or are specified, it will only " +
- "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
- " that coordinate.",
- consoleSetTerrainTexture);
-
- m_scene.AddCommand(this, "set terrain heights",
- "set terrain heights [] []",
- "Sets the terrain texture heights on corner # to /, if or are specified, it will only " +
- "set it on regions with a matching coordinate. Specify -1 in or to wildcard" +
- " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.",
- consoleSetTerrainHeights);
+ Scene = scene;
+ Scene.RegisterModuleInterface(this);
+ Scene.EventManager.OnNewClient += EventManager_OnNewClient;
+ Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
+
+ m_commands = new EstateManagementCommands(this);
+ m_commands.Initialise();
}
- #region Console Commands
-
- public void consoleSetTerrainTexture(string module, string[] args)
- {
- string num = args[3];
- string uuid = args[4];
- int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
- int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
-
- if (x == -1 || m_scene.RegionInfo.RegionLocX == x)
- {
- if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
- {
- int corner = int.Parse(num);
- UUID texture = UUID.Parse(uuid);
-
- m_log.Debug("[ESTATEMODULE] Setting terrain textures for " + m_scene.RegionInfo.RegionName +
- string.Format(" (C#{0} = {1})", corner, texture));
-
- switch (corner)
- {
- case 0:
- m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
- break;
- case 1:
- m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture;
- break;
- case 2:
- m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture;
- break;
- case 3:
- m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
- break;
- }
- m_scene.RegionInfo.RegionSettings.Save();
- TriggerRegionInfoChange();
- sendRegionInfoPacketToAll();
-
- }
- }
- }
-
- public void consoleSetTerrainHeights(string module, string[] args)
- {
- string num = args[3];
- string min = args[4];
- string max = args[5];
- int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
- int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
-
- if (x == -1 || m_scene.RegionInfo.RegionLocX == x)
- {
- if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
- {
- int corner = int.Parse(num);
- float lowValue = float.Parse(min, Culture.NumberFormatInfo);
- float highValue = float.Parse(max, Culture.NumberFormatInfo);
-
- m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName +
- string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));
-
- switch (corner)
- {
- case 0:
- m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue;
- break;
- case 1:
- m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue;
- break;
- case 2:
- m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue;
- break;
- case 3:
- m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue;
- m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
- break;
- }
- m_scene.RegionInfo.RegionSettings.Save();
- TriggerRegionInfoChange();
- sendRegionHandshakeToAll();
- }
- }
- }
-
- #endregion
-
public void PostInitialise()
{
// Sets up the sun module based no the saved Estate and Region Settings
// DO NOT REMOVE or the sun will stop working
- m_scene.TriggerEstateSunUpdate();
+ Scene.TriggerEstateSunUpdate();
}
public void Close()
@@ -1048,14 +953,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void changeWaterHeight(float height)
{
setRegionTerrainSettings(height,
- (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
- (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit,
- m_scene.RegionInfo.RegionSettings.UseEstateSun,
- m_scene.RegionInfo.RegionSettings.FixedSun,
- (float)m_scene.RegionInfo.RegionSettings.SunPosition,
- m_scene.RegionInfo.EstateSettings.UseGlobalTime,
- m_scene.RegionInfo.EstateSettings.FixedSun,
- (float)m_scene.RegionInfo.EstateSettings.SunPosition);
+ (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
+ (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit,
+ Scene.RegionInfo.RegionSettings.UseEstateSun,
+ Scene.RegionInfo.RegionSettings.FixedSun,
+ (float)Scene.RegionInfo.RegionSettings.SunPosition,
+ Scene.RegionInfo.EstateSettings.UseGlobalTime,
+ Scene.RegionInfo.EstateSettings.FixedSun,
+ (float)Scene.RegionInfo.EstateSettings.SunPosition);
sendRegionInfoPacketToAll();
}
@@ -1095,32 +1000,32 @@ namespace OpenSim.Region.CoreModules.World.Estate
// Fully implemented
//
- if (m_scene.RegionInfo.RegionSettings.AllowDamage)
+ if (Scene.RegionInfo.RegionSettings.AllowDamage)
flags |= RegionFlags.AllowDamage;
- if (m_scene.RegionInfo.RegionSettings.BlockTerraform)
+ if (Scene.RegionInfo.RegionSettings.BlockTerraform)
flags |= RegionFlags.BlockTerraform;
- if (!m_scene.RegionInfo.RegionSettings.AllowLandResell)
+ if (!Scene.RegionInfo.RegionSettings.AllowLandResell)
flags |= RegionFlags.BlockLandResell;
- if (m_scene.RegionInfo.RegionSettings.DisableCollisions)
+ if (Scene.RegionInfo.RegionSettings.DisableCollisions)
flags |= RegionFlags.SkipCollisions;
- if (m_scene.RegionInfo.RegionSettings.DisableScripts)
+ if (Scene.RegionInfo.RegionSettings.DisableScripts)
flags |= RegionFlags.SkipScripts;
- if (m_scene.RegionInfo.RegionSettings.DisablePhysics)
+ if (Scene.RegionInfo.RegionSettings.DisablePhysics)
flags |= RegionFlags.SkipPhysics;
- if (m_scene.RegionInfo.RegionSettings.BlockFly)
+ if (Scene.RegionInfo.RegionSettings.BlockFly)
flags |= RegionFlags.NoFly;
- if (m_scene.RegionInfo.RegionSettings.RestrictPushing)
+ if (Scene.RegionInfo.RegionSettings.RestrictPushing)
flags |= RegionFlags.RestrictPushObject;
- if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
+ if (Scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
flags |= RegionFlags.AllowParcelChanges;
- if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
+ if (Scene.RegionInfo.RegionSettings.BlockShowInSearch)
flags |= RegionFlags.BlockParcelSearch;
- if (m_scene.RegionInfo.RegionSettings.FixedSun)
+ if (Scene.RegionInfo.RegionSettings.FixedSun)
flags |= RegionFlags.SunFixed;
- if (m_scene.RegionInfo.RegionSettings.Sandbox)
+ if (Scene.RegionInfo.RegionSettings.Sandbox)
flags |= RegionFlags.Sandbox;
- if (m_scene.RegionInfo.EstateSettings.AllowVoice)
+ if (Scene.RegionInfo.EstateSettings.AllowVoice)
flags |= RegionFlags.AllowVoice;
// Fudge these to always on, so the menu options activate
@@ -1142,32 +1047,32 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
RegionFlags flags = RegionFlags.None;
- if (m_scene.RegionInfo.EstateSettings.FixedSun)
+ if (Scene.RegionInfo.EstateSettings.FixedSun)
flags |= RegionFlags.SunFixed;
- if (m_scene.RegionInfo.EstateSettings.PublicAccess)
+ if (Scene.RegionInfo.EstateSettings.PublicAccess)
flags |= (RegionFlags.PublicAllowed |
RegionFlags.ExternallyVisible);
- if (m_scene.RegionInfo.EstateSettings.AllowVoice)
+ if (Scene.RegionInfo.EstateSettings.AllowVoice)
flags |= RegionFlags.AllowVoice;
- if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
+ if (Scene.RegionInfo.EstateSettings.AllowDirectTeleport)
flags |= RegionFlags.AllowDirectTeleport;
- if (m_scene.RegionInfo.EstateSettings.DenyAnonymous)
+ if (Scene.RegionInfo.EstateSettings.DenyAnonymous)
flags |= RegionFlags.DenyAnonymous;
- if (m_scene.RegionInfo.EstateSettings.DenyIdentified)
+ if (Scene.RegionInfo.EstateSettings.DenyIdentified)
flags |= RegionFlags.DenyIdentified;
- if (m_scene.RegionInfo.EstateSettings.DenyTransacted)
+ if (Scene.RegionInfo.EstateSettings.DenyTransacted)
flags |= RegionFlags.DenyTransacted;
- if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
+ if (Scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner)
flags |= RegionFlags.AbuseEmailToEstateOwner;
- if (m_scene.RegionInfo.EstateSettings.BlockDwell)
+ if (Scene.RegionInfo.EstateSettings.BlockDwell)
flags |= RegionFlags.BlockDwell;
- if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts)
+ if (Scene.RegionInfo.EstateSettings.EstateSkipScripts)
flags |= RegionFlags.EstateSkipScripts;
- if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
+ if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport)
flags |= RegionFlags.ResetHomeOnTeleport;
- if (m_scene.RegionInfo.EstateSettings.TaxFree)
+ if (Scene.RegionInfo.EstateSettings.TaxFree)
flags |= RegionFlags.TaxFree;
- if (m_scene.RegionInfo.EstateSettings.DenyMinors)
+ if (Scene.RegionInfo.EstateSettings.DenyMinors)
flags |= (RegionFlags)(1 << 30);
return (uint)flags;
@@ -1175,17 +1080,17 @@ namespace OpenSim.Region.CoreModules.World.Estate
public bool IsManager(UUID avatarID)
{
- if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner)
+ if (avatarID == Scene.RegionInfo.EstateSettings.EstateOwner)
return true;
- List ems = new List(m_scene.RegionInfo.EstateSettings.EstateManagers);
+ List ems = new List(Scene.RegionInfo.EstateSettings.EstateManagers);
if (ems.Contains(avatarID))
return true;
return false;
}
- protected void TriggerRegionInfoChange()
+ public void TriggerRegionInfoChange()
{
m_regionChangeTimer.Stop();
m_regionChangeTimer.Start();
@@ -1196,23 +1101,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
ChangeDelegate change = OnRegionInfoChange;
if (change != null)
- change(m_scene.RegionInfo.RegionID);
+ change(Scene.RegionInfo.RegionID);
}
- protected void TriggerEstateInfoChange()
+ public void TriggerEstateInfoChange()
{
ChangeDelegate change = OnEstateInfoChange;
if (change != null)
- change(m_scene.RegionInfo.RegionID);
+ change(Scene.RegionInfo.RegionID);
}
- protected void TriggerEstateMessage(UUID fromID, string fromName, string message)
+ public void TriggerEstateMessage(UUID fromID, string fromName, string message)
{
MessageDelegate onmessage = OnEstateMessage;
if (onmessage != null)
- onmessage(m_scene.RegionInfo.RegionID, fromID, fromName, message);
+ onmessage(Scene.RegionInfo.RegionID, fromID, fromName, message);
}
}
}
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index e0f36a2081..10949701d9 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -764,10 +764,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
if (!responseMap.ContainsKey(itemtype.ToString())) // remote sim doesnt have the stated region handle
{
- if (!m_blacklistedregions.ContainsKey(regionhandle))
+ m_log.DebugFormat("[WORLD MAP]: Remote sim does not have the stated region. Blacklisting.");
+ lock (m_blacklistedregions)
{
- m_log.DebugFormat("[WORLD MAP]: Remote sim does not have the stated region. Blacklisting.");
- m_blacklistedregions.Add(regionhandle, Environment.TickCount);
+ if (!m_blacklistedregions.ContainsKey(regionhandle))
+ m_blacklistedregions.Add(regionhandle, Environment.TickCount);
}
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2424194ad5..171d63705c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
+ public bool EmergencyMonitoring = false;
+
public SynchronizeSceneHandler SynchronizeScene;
public SimStatsReporter StatsReporter;
public List NorthBorders = new List();
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 6630edb15e..dfeecb1bbc 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -95,7 +95,15 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
"Show throttle settings for each client and for the server overall",
"Without the 'full' option, only root agents are shown."
+ " With the 'full' option child agents are also shown.",
- ShowThrottlesReport);
+ ShowThrottlesReport);
+
+ scene.AddCommand(
+ this, "emergency-monitoring",
+ "Go on/off emergency monitoring mode",
+ "Go on/off emergency monitoring mode",
+ "Go on/off emergency monitoring mode",
+ EmergencyMonitoring);
+
}
public void RemoveRegion(Scene scene)
@@ -120,7 +128,25 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
{
MainConsole.Instance.Output(GetThrottlesReport(cmd));
}
-
+
+ protected void EmergencyMonitoring(string module, string[] cmd)
+ {
+ bool mode = true;
+ if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on"))
+ {
+ mode = true;
+ MainConsole.Instance.Output("Emergency Monitoring ON");
+ }
+ else
+ {
+ mode = false;
+ MainConsole.Instance.Output("Emergency Monitoring OFF");
+ }
+
+ foreach (Scene s in m_scenes.Values)
+ s.EmergencyMonitoring = mode;
+ }
+
protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
{
return string.Format(
@@ -335,7 +361,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
ThrottleRates throttleRates = udpServer.ThrottleRates;
report.AppendFormat(
"{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}",
- "n/a",
+ (throttleRates.Total * 8) / 1000,
(throttleRates.ResendLimit * 8) / 1000,
(throttleRates.LandLimit * 8) / 1000,
(throttleRates.WindLimit * 8) / 1000,
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index b33b0d5847..448e321e03 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -205,6 +205,11 @@ namespace OpenSim.Server.Handlers.Simulation
// We're behind a proxy
Hashtable headers = (Hashtable)request["headers"];
+
+ //// DEBUG
+ //foreach (object o in headers.Keys)
+ // m_log.DebugFormat("XXX {0} = {1}", o.ToString(), (headers[o] == null? "null" : headers[o].ToString()));
+
string xff = "X-Forwarded-For";
if (headers.ContainsKey(xff.ToLower()))
xff = xff.ToLower();
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 7245bee2e3..5bac56e66a 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -306,6 +306,9 @@
[ODEPhysicsSettings]
;# {mesh_sculpted_prim} {[Startup]physics:OpenDynamicsEngine} {Mesh sculpties so they collide as they look?} {true false} true
;; Do we want to mesh sculpted prim to collide like they look?
+ ;; If you are seeing sculpt texture decode problems
+ ;; (messages such as "Decoded image with unhandled number of components: 0 shortly followed by a physcs exception")
+ ;; then you might want to try setting this to false.
; mesh_sculpted_prim = true
;# {use_NINJA_physics_joints} {[Startup]physics:OpenDynamicsEngine} {Use jointed (NINJA) physics?} {true false} false
diff --git a/bin/sqlite3.dll b/bin/sqlite3.dll
index 558a015a7f..f29dc625fa 100755
Binary files a/bin/sqlite3.dll and b/bin/sqlite3.dll differ