diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs index fd407d9..d8720db 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -261,6 +261,23 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
261 | public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, | 261 | public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, |
262 | byte[] data, bool storeLocal, bool tempFile) | 262 | byte[] data, bool storeLocal, bool tempFile) |
263 | { | 263 | { |
264 | if ((AssetType)type == AssetType.Texture || | ||
265 | (AssetType)type == AssetType.Sound || | ||
266 | (AssetType)type == AssetType.TextureTGA || | ||
267 | (AssetType)type == AssetType.Animation) | ||
268 | { | ||
269 | Scene scene = (Scene)remoteClient.Scene; | ||
270 | IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); | ||
271 | if (mm != null) | ||
272 | { | ||
273 | if (!mm.UploadCovered(remoteClient)) | ||
274 | { | ||
275 | remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false); | ||
276 | return; | ||
277 | } | ||
278 | } | ||
279 | } | ||
280 | |||
264 | // Console.WriteLine("asset upload of " + assetID); | 281 | // Console.WriteLine("asset upload of " + assetID); |
265 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); | 282 | AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); |
266 | 283 | ||
@@ -288,4 +305,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
288 | transactions.HandleXfer(xferID, packetID, data); | 305 | transactions.HandleXfer(xferID, packetID, data); |
289 | } | 306 | } |
290 | } | 307 | } |
291 | } \ No newline at end of file | 308 | } |