mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs OpenSim/Services/Interfaces/IUserAccountService.cs
This commit is contained in:
@@ -192,8 +192,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName);
|
||||
|
||||
// Let's find out if this is a foreign user or a local user
|
||||
UserAccount account = m_aScene.UserAccountService.GetUserAccount(m_aScene.RegionInfo.ScopeID, id);
|
||||
if (account != null)
|
||||
IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>();
|
||||
if (uMan != null && uMan.IsLocalGridUser(id))
|
||||
{
|
||||
// local grid user
|
||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local");
|
||||
@@ -231,8 +231,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>();
|
||||
GridRegion homeGatekeeper = MakeRegion(aCircuit);
|
||||
|
||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}:{5}",
|
||||
aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ExternalHostName, homeGatekeeper.HttpPort, homeGatekeeper.RegionName);
|
||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}",
|
||||
aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName);
|
||||
|
||||
DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq);
|
||||
return true;
|
||||
@@ -318,8 +318,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
|
||||
// Let's find out if this is a foreign user or a local user
|
||||
IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>();
|
||||
UserAccount account = m_aScene.UserAccountService.GetUserAccount(m_aScene.RegionInfo.ScopeID, obj.AgentId);
|
||||
if (account != null)
|
||||
if (uMan != null && uMan.IsLocalGridUser(obj.AgentId))
|
||||
{
|
||||
// local grid user
|
||||
return;
|
||||
@@ -352,6 +353,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
region.ExternalHostName = uri.Host;
|
||||
region.HttpPort = (uint)uri.Port;
|
||||
region.ServerURI = uri.ToString();
|
||||
region.RegionName = string.Empty;
|
||||
region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), (int)0);
|
||||
return region;
|
||||
|
||||
@@ -124,8 +124,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
|
||||
protected override string GenerateLandmark(ScenePresence presence, out string prefix, out string suffix)
|
||||
{
|
||||
UserAccount account = m_Scene.UserAccountService.GetUserAccount(m_Scene.RegionInfo.ScopeID, presence.UUID);
|
||||
if (account == null)
|
||||
if (UserManagementModule != null && !UserManagementModule.IsLocalGridUser(presence.UUID))
|
||||
prefix = "HG ";
|
||||
else
|
||||
prefix = string.Empty;
|
||||
@@ -210,12 +209,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
public override bool IsForeignUser(UUID userID, out string assetServerURL)
|
||||
{
|
||||
assetServerURL = string.Empty;
|
||||
UserAccount account = null;
|
||||
if (m_Scene.UserAccountService != null)
|
||||
account = m_Scene.UserAccountService.GetUserAccount(m_Scene.RegionInfo.ScopeID, userID);
|
||||
|
||||
if (account == null) // foreign
|
||||
{
|
||||
if (UserManagementModule != null && !UserManagementModule.IsLocalGridUser(userID))
|
||||
{ // foreign
|
||||
ScenePresence sp = null;
|
||||
if (m_Scene.TryGetScenePresence(userID, out sp))
|
||||
{
|
||||
|
||||
@@ -425,6 +425,15 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
|
||||
//}
|
||||
|
||||
public bool IsLocalGridUser(UUID uuid)
|
||||
{
|
||||
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, uuid);
|
||||
if (account == null || (account != null && !account.LocalToGrid))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion IUserManagement
|
||||
|
||||
private void HandleShowUsers(string module, string[] cmd)
|
||||
|
||||
Reference in New Issue
Block a user