mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
This commit is contained in:
@@ -484,6 +484,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error updating classified", false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,6 +511,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error classified delete", false);
|
||||
return;
|
||||
}
|
||||
|
||||
parameters = (OSDMap)Params;
|
||||
@@ -612,6 +614,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error selecting pick", false);
|
||||
return;
|
||||
}
|
||||
pick = (UserProfilePick) Pick;
|
||||
|
||||
@@ -714,6 +717,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error updating pick", false);
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[PROFILES]: Finish PickInfoUpdate {0} {1}", pick.Name, pick.PickId.ToString());
|
||||
@@ -740,6 +744,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error picks delete", false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion Picks
|
||||
@@ -807,6 +812,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
object Note = note;
|
||||
if(!rpc.JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString()))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error updating note", false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -916,6 +923,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error updating interests", false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1044,6 +1052,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Error updating properties", false);
|
||||
return;
|
||||
}
|
||||
|
||||
RequestAvatarProperties(remoteClient, newProfile.ID);
|
||||
|
||||
@@ -761,12 +761,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
string reason;
|
||||
string version;
|
||||
if (!Scene.SimulationService.QueryAccess(
|
||||
finalDestination, sp.ControllingClient.AgentId, homeURI, position, out version, out reason))
|
||||
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, out version, out reason))
|
||||
{
|
||||
sp.ControllingClient.SendTeleportFailed(reason);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because {3}",
|
||||
"[ENTITY TRANSFER MODULE]: {0} was stopped from teleporting from {1} to {2} because: {3}",
|
||||
sp.Name, sp.Scene.Name, finalDestination.RegionName, reason);
|
||||
|
||||
return;
|
||||
@@ -1510,7 +1510,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
// Check to see if we have access to the target region.
|
||||
if (neighbourRegion != null
|
||||
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, newpos, out version, out failureReason))
|
||||
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, out version, out failureReason))
|
||||
{
|
||||
// remember banned
|
||||
m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
|
||||
|
||||
@@ -311,9 +311,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
|
||||
RezSelected, RemoveItem, fromTaskID, attachment);
|
||||
|
||||
if (sog == null)
|
||||
remoteClient.SendAgentAlertMessage("Unable to rez: problem accessing inventory or locating assets", false);
|
||||
|
||||
return sog;
|
||||
|
||||
}
|
||||
|
||||
@@ -797,12 +797,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
m_log.WarnFormat(
|
||||
"[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()",
|
||||
assetID, item.Name, item.ID, remoteClient.Name);
|
||||
remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: could not find asset {0} for item {1}.", assetID, item.Name), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[INVENTORY ACCESS MODULE]: Could not find asset {0} for {1} in RezObject()",
|
||||
assetID, remoteClient.Name);
|
||||
remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: could not find asset {0}.", assetID), false);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -89,35 +89,43 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
|
||||
public bool IsAuthorizedForRegion(
|
||||
string user, string firstName, string lastName, string regionID, out string message)
|
||||
{
|
||||
message = "authorized";
|
||||
|
||||
// This should not happen
|
||||
if (m_Scene.RegionInfo.RegionID.ToString() != regionID)
|
||||
{
|
||||
m_log.WarnFormat("[AuthorizationService]: Service for region {0} received request to authorize for region {1}",
|
||||
m_Scene.RegionInfo.RegionID, regionID);
|
||||
return true;
|
||||
message = string.Format("Region {0} received request to authorize for region {1}", m_Scene.RegionInfo.RegionID, regionID);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_accessValue == AccessFlags.None)
|
||||
{
|
||||
message = "Authorized";
|
||||
return true;
|
||||
}
|
||||
|
||||
UUID userID = new UUID(user);
|
||||
bool authorized = true;
|
||||
if ((m_accessValue & AccessFlags.DisallowForeigners) == AccessFlags.DisallowForeigners)
|
||||
|
||||
if ((m_accessValue & AccessFlags.DisallowForeigners) != 0)
|
||||
{
|
||||
authorized = m_UserManagement.IsLocalGridUser(userID);
|
||||
if (!authorized)
|
||||
message = "no foreigner users allowed in this region";
|
||||
}
|
||||
if (authorized && (m_accessValue & AccessFlags.DisallowResidents) == AccessFlags.DisallowResidents)
|
||||
{
|
||||
authorized = m_Scene.Permissions.IsGod(userID) | m_Scene.Permissions.IsAdministrator(userID);
|
||||
if (!authorized)
|
||||
message = "only Admins and Managers allowed in this region";
|
||||
if (!m_UserManagement.IsLocalGridUser(userID))
|
||||
{
|
||||
message = "No foreign users allowed in this region";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return authorized;
|
||||
if ((m_accessValue & AccessFlags.DisallowResidents) != 0)
|
||||
{
|
||||
if (!(m_Scene.Permissions.IsGod(userID) || m_Scene.Permissions.IsAdministrator(userID)))
|
||||
{
|
||||
message = "Only Admins and Managers allowed in this region";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
message = "Authorized";
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
version = ServiceVersion;
|
||||
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
|
||||
// s.RegionInfo.RegionName, destination.RegionHandle);
|
||||
|
||||
return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, position, out reason);
|
||||
return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason);
|
||||
}
|
||||
|
||||
//m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return m_remoteConnector.UpdateAgent(destination, cAgentData);
|
||||
}
|
||||
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason)
|
||||
public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
|
||||
{
|
||||
reason = "Communications failure";
|
||||
version = "Unknown";
|
||||
@@ -216,12 +216,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return false;
|
||||
|
||||
// Try local first
|
||||
if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason))
|
||||
if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason))
|
||||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(destination.RegionID))
|
||||
return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason);
|
||||
return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -143,28 +143,32 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
}
|
||||
|
||||
|
||||
//m_log.DebugFormat("MAP NAME=({0})", mapName);
|
||||
|
||||
// Hack to get around the fact that ll V3 now drops the port from the
|
||||
// map name. See https://jira.secondlife.com/browse/VWR-28570
|
||||
//
|
||||
// Caller, use this magic form instead:
|
||||
// secondlife://http|!!mygrid.com|8002|Region+Name/128/128
|
||||
// or url encode if possible.
|
||||
// the hacks we do with this viewer...
|
||||
//
|
||||
string mapNameOrig = mapName;
|
||||
if (mapName.Contains("|"))
|
||||
mapName = mapName.Replace('|', ':');
|
||||
if (mapName.Contains("+"))
|
||||
mapName = mapName.Replace('+', ' ');
|
||||
if (mapName.Contains("!"))
|
||||
mapName = mapName.Replace('!', '/');
|
||||
|
||||
// try to fetch from GridServer
|
||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||
|
||||
|
||||
string mapNameOrig = mapName;
|
||||
if (regionInfos.Count == 0)
|
||||
{
|
||||
// Hack to get around the fact that ll V3 now drops the port from the
|
||||
// map name. See https://jira.secondlife.com/browse/VWR-28570
|
||||
//
|
||||
// Caller, use this magic form instead:
|
||||
// secondlife://http|!!mygrid.com|8002|Region+Name/128/128
|
||||
// or url encode if possible.
|
||||
// the hacks we do with this viewer...
|
||||
//
|
||||
if (mapName.Contains("|"))
|
||||
mapName = mapName.Replace('|', ':');
|
||||
if (mapName.Contains("+"))
|
||||
mapName = mapName.Replace('+', ' ');
|
||||
if (mapName.Contains("!"))
|
||||
mapName = mapName.Replace('!', '/');
|
||||
|
||||
if (mapName != mapNameOrig)
|
||||
regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags);
|
||||
|
||||
if (regionInfos.Count > 0)
|
||||
{
|
||||
foreach (GridRegion info in regionInfos)
|
||||
@@ -178,7 +182,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
data.MapImageId = info.TerrainImage;
|
||||
// ugh! V2-3 is very sensitive about the result being
|
||||
// exactly the same as the requested name
|
||||
if (regionInfos.Count == 1 && mapNameOrig.Contains("|") || mapNameOrig.Contains("+"))
|
||||
if (regionInfos.Count == 1 && (mapName != mapNameOrig))
|
||||
data.Name = mapNameOrig;
|
||||
else
|
||||
data.Name = info.RegionName;
|
||||
|
||||
Reference in New Issue
Block a user