Enforce estate bans on Teleports.
parent
83105211bc
commit
b6e7e5ed42
|
@ -80,6 +80,8 @@ namespace OpenSim.Framework
|
||||||
/// <param name="circuitCode"></param>
|
/// <param name="circuitCode"></param>
|
||||||
/// <param name="agentData"></param>
|
/// <param name="agentData"></param>
|
||||||
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
|
public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
|
||||||
|
{
|
||||||
|
lock (AgentCircuits)
|
||||||
{
|
{
|
||||||
if (AgentCircuits.ContainsKey(circuitCode))
|
if (AgentCircuits.ContainsKey(circuitCode))
|
||||||
{
|
{
|
||||||
|
@ -90,6 +92,16 @@ namespace OpenSim.Framework
|
||||||
AgentCircuits.Add(circuitCode, agentData);
|
AgentCircuits.Add(circuitCode, agentData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void RemoveCircuit(uint circuitCode)
|
||||||
|
{
|
||||||
|
lock (AgentCircuits)
|
||||||
|
{
|
||||||
|
if (AgentCircuits.ContainsKey(circuitCode))
|
||||||
|
AgentCircuits.Remove(circuitCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateAgentData(AgentCircuitData agentData)
|
public void UpdateAgentData(AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
|
|
|
@ -538,8 +538,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
"[CLIENT]: Close has been called with shutdownCircuit = {0} for {1} attached to scene {2}",
|
"[CLIENT]: Close has been called with shutdownCircuit = {0} for {1} attached to scene {2}",
|
||||||
shutdownCircuit, Name, m_scene.RegionInfo.RegionName);
|
shutdownCircuit, Name, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
if (m_imageManager != null)
|
||||||
m_imageManager.Close();
|
m_imageManager.Close();
|
||||||
|
|
||||||
|
if (m_PacketHandler != null)
|
||||||
m_PacketHandler.Flush();
|
m_PacketHandler.Flush();
|
||||||
|
|
||||||
// raise an event on the packet server to Shutdown the circuit
|
// raise an event on the packet server to Shutdown the circuit
|
||||||
|
|
|
@ -443,9 +443,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
m_packetServer.AddNewClient(epSender, useCircuit, m_assetCache, sessionInfo, epProxy);
|
m_packetServer.AddNewClient(epSender, useCircuit, m_assetCache, sessionInfo, epProxy);
|
||||||
|
|
||||||
m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
"[CONNECTION SUCCESS]: Incoming client {0} (circuit code {1}) received and authenticated for {2}",
|
// "[CONNECTION SUCCESS]: Incoming client {0} (circuit code {1}) received and authenticated for {2}",
|
||||||
useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code, m_localScene.RegionInfo.RegionName);
|
// useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code, m_localScene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2286,6 +2286,32 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public override void AddNewClient(IClientAPI client)
|
public override void AddNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
|
if (m_regInfo.EstateSettings.IsBanned(client.AgentId))
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
|
||||||
|
client.AgentId, client.FirstName, client.LastName, RegionInfo.RegionName);
|
||||||
|
client.SendAlertMessage("Denied access to region " + RegionInfo.RegionName + ". You have been banned from that region.");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
IEventQueue eq = RequestModuleInterface<IEventQueue>();
|
||||||
|
if (eq != null)
|
||||||
|
{
|
||||||
|
eq.DisableSimulator(RegionInfo.RegionHandle, client.AgentId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
client.SendShutdownConnectionNotice();
|
||||||
|
|
||||||
|
client.Close(false);
|
||||||
|
CapsModule.RemoveCapsHandler(client.AgentId);
|
||||||
|
m_authenticateHandler.RemoveCircuit(client.CircuitCode);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[SCENE]: Exception while closing banned client {0} {1}: {2}", client.FirstName, client.LastName, e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SubscribeToClientEvents(client);
|
SubscribeToClientEvents(client);
|
||||||
ScenePresence presence;
|
ScenePresence presence;
|
||||||
|
|
||||||
|
@ -2803,7 +2829,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
|
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[CONNECTION BEGIN]: Denied access to: {0} at {1} because the user is on the region banlist",
|
"[CONNECTION BEGIN]: Incoming user {0} at {1} is on the region banlist",
|
||||||
agent.AgentID, RegionInfo.RegionName);
|
agent.AgentID, RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue