diff options
author | Justin Clark-Casey (justincc) | 2012-09-24 22:52:33 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-24 22:52:33 +0100 |
commit | ac02cadbdb817f0a8ab913bfd67f2f8919cdd69f (patch) | |
tree | f0fca1b7c047760a0927441840e7709ff91e7fb5 /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |
parent | Documenting LSL script-related events (diff) | |
parent | HG Rez object: warn the user if the item or asset cannot be found. (diff) | |
download | opensim-SC_OLD-ac02cadbdb817f0a8ab913bfd67f2f8919cdd69f.zip opensim-SC_OLD-ac02cadbdb817f0a8ab913bfd67f2f8919cdd69f.tar.gz opensim-SC_OLD-ac02cadbdb817f0a8ab913bfd67f2f8919cdd69f.tar.bz2 opensim-SC_OLD-ac02cadbdb817f0a8ab913bfd67f2f8919cdd69f.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 0b386d3..a6698e6 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -150,6 +150,34 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
150 | 150 | ||
151 | if (m_Enabled) | 151 | if (m_Enabled) |
152 | scene.RegisterModuleInterface<IUserAgentVerificationModule>(this); | 152 | scene.RegisterModuleInterface<IUserAgentVerificationModule>(this); |
153 | |||
154 | scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject; | ||
155 | } | ||
156 | |||
157 | void OnIncomingSceneObject(SceneObjectGroup so) | ||
158 | { | ||
159 | if (!so.IsAttachment) | ||
160 | return; | ||
161 | |||
162 | if (so.Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar)) | ||
163 | return; | ||
164 | |||
165 | // foreign user | ||
166 | AgentCircuitData aCircuit = so.Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar); | ||
167 | if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0) | ||
168 | { | ||
169 | if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) | ||
170 | { | ||
171 | string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); | ||
172 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); | ||
173 | Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>(); | ||
174 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(so.Scene.AssetService, url); | ||
175 | uuidGatherer.GatherAssetUuids(so, ids); | ||
176 | |||
177 | foreach (KeyValuePair<UUID, AssetType> kvp in ids) | ||
178 | uuidGatherer.FetchAsset(kvp.Key); | ||
179 | } | ||
180 | } | ||
153 | } | 181 | } |
154 | 182 | ||
155 | protected override void OnNewClient(IClientAPI client) | 183 | protected override void OnNewClient(IClientAPI client) |