mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs
This commit is contained in:
@@ -150,6 +150,34 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
if (m_Enabled)
|
||||
scene.RegisterModuleInterface<IUserAgentVerificationModule>(this);
|
||||
|
||||
scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject;
|
||||
}
|
||||
|
||||
void OnIncomingSceneObject(SceneObjectGroup so)
|
||||
{
|
||||
if (!so.IsAttachment)
|
||||
return;
|
||||
|
||||
if (so.Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar))
|
||||
return;
|
||||
|
||||
// foreign user
|
||||
AgentCircuitData aCircuit = so.Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar);
|
||||
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
||||
{
|
||||
if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
||||
{
|
||||
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
|
||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url);
|
||||
Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
|
||||
HGUuidGatherer uuidGatherer = new HGUuidGatherer(so.Scene.AssetService, url);
|
||||
uuidGatherer.GatherAssetUuids(so, ids);
|
||||
|
||||
foreach (KeyValuePair<UUID, AssetType> kvp in ids)
|
||||
uuidGatherer.FetchAsset(kvp.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnNewClient(IClientAPI client)
|
||||
|
||||
Reference in New Issue
Block a user