aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJeff Ames2008-07-06 14:02:22 +0000
committerJeff Ames2008-07-06 14:02:22 +0000
commitd470d30c09fde202f708a9c8af763f5d16e18bfb (patch)
tree6a86572d268dda911a5208bf5be1a1f2c19adc3c /OpenSim/Region/Environment
parentRemove scripts that don't really belong in OpenSim SVN. (diff)
downloadopensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.zip
opensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.tar.gz
opensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.tar.bz2
opensim-SC-d470d30c09fde202f708a9c8af763f5d16e18bfb.tar.xz
Copyright notices and formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IEmailModule.cs20
-rw-r--r--OpenSim/Region/Environment/Interfaces/IScriptModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs51
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs84
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
7 files changed, 95 insertions, 72 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IEmailModule.cs b/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
index aae5d9c..3726ba5 100644
--- a/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
@@ -31,18 +31,18 @@ using libsecondlife;
31 31
32namespace OpenSim.Region.Environment.Interfaces 32namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public class Email 34 public class Email
35 { 35 {
36 public string time; 36 public string time;
37 public string sender; 37 public string sender;
38 public string subject; 38 public string subject;
39 public string message; 39 public string message;
40 public int numLeft; 40 public int numLeft;
41 } 41 }
42 42
43 public interface IEmailModule : IRegionModule 43 public interface IEmailModule : IRegionModule
44 { 44 {
45 void SendEmail(LLUUID objectID, string address, string subject, string body); 45 void SendEmail(LLUUID objectID, string address, string subject, string body);
46 Email GetNextEmail(LLUUID objectID, string sender, string subject); 46 Email GetNextEmail(LLUUID objectID, string sender, string subject);
47 } 47 }
48} 48}
diff --git a/OpenSim/Region/Environment/Interfaces/IScriptModule.cs b/OpenSim/Region/Environment/Interfaces/IScriptModule.cs
index 7aecaf7..8d3868e 100644
--- a/OpenSim/Region/Environment/Interfaces/IScriptModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IScriptModule.cs
@@ -33,6 +33,6 @@ namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public interface IScriptModule : IRegionModule 34 public interface IScriptModule : IRegionModule
35 { 35 {
36 bool GetScriptRunning(LLUUID objectID, LLUUID itemID); 36 bool GetScriptRunning(LLUUID objectID, LLUUID itemID);
37 } 37 }
38} 38}
diff --git a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
index 5d33b04..77b2d29 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
@@ -1,3 +1,30 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
1using System; 28using System;
2using System.Reflection; 29using System.Reflection;
3using System.Collections.Generic; 30using System.Collections.Generic;
@@ -24,9 +51,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
24 51
25 // Scenes by Region Handle 52 // Scenes by Region Handle
26 private Dictionary<ulong, Scene> m_Scenes = 53 private Dictionary<ulong, Scene> m_Scenes =
27 new Dictionary<ulong, Scene>(); 54 new Dictionary<ulong, Scene>();
28 55
29 private bool m_Enabled = false; 56 private bool m_Enabled = false;
30 57
31 public void Initialise(Scene scene, IConfigSource config) 58 public void Initialise(Scene scene, IConfigSource config)
32 { 59 {
@@ -34,8 +61,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
34 61
35 IConfig startupConfig = m_Config.Configs["Startup"]; 62 IConfig startupConfig = m_Config.Configs["Startup"];
36 63
37 m_Enabled = (startupConfig.GetString("emailmodule", 64 m_Enabled = (startupConfig.GetString("emailmodule",
38 "DefaultEmailModule") == "DefaultEmailModule"); 65 "DefaultEmailModule") == "DefaultEmailModule");
39 66
40 // It's a go! 67 // It's a go!
41 if (m_Enabled) 68 if (m_Enabled)
@@ -79,12 +106,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
79 } 106 }
80 107
81 public void SendEmail(LLUUID objectID, string address, string subject, string body) 108 public void SendEmail(LLUUID objectID, string address, string subject, string body)
82 { 109 {
83 } 110 }
84 111
85 public Email GetNextEmail(LLUUID objectID, string sender, string subject) 112 public Email GetNextEmail(LLUUID objectID, string sender, string subject)
86 { 113 {
87 return null; 114 return null;
88 } 115 }
89 } 116 }
90} 117}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 53681f8..d87b930 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -995,7 +995,7 @@ namespace OpenSim.Region.Environment.Scenes
995 else 995 else
996 { 996 {
997 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId); 997 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
998 if(profile == null || profile.RootFolder == null) 998 if (profile == null || profile.RootFolder == null)
999 { 999 {
1000 m_log.ErrorFormat( 1000 m_log.ErrorFormat(
1001 "[PRIM INVENTORY]: " + 1001 "[PRIM INVENTORY]: " +
@@ -1040,7 +1040,7 @@ namespace OpenSim.Region.Environment.Scenes
1040 return; 1040 return;
1041 } 1041 }
1042 1042
1043 if(part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) 1043 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0)
1044 { 1044 {
1045 // object cannot copy items to an object owned by a different owner 1045 // object cannot copy items to an object owned by a different owner
1046 // unless llAllowInventoryDrop has been called 1046 // unless llAllowInventoryDrop has been called
@@ -1049,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes
1049 } 1049 }
1050 1050
1051 // must have both move and modify permission to put an item in an object 1051 // must have both move and modify permission to put an item in an object
1052 if((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0 ) 1052 if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
1053 { 1053 {
1054 return; 1054 return;
1055 } 1055 }
@@ -1099,7 +1099,7 @@ namespace OpenSim.Region.Environment.Scenes
1099 1099
1100 ScenePresence avatar; 1100 ScenePresence avatar;
1101 1101
1102 if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1102 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
1103 { 1103 {
1104 destPart.GetProperties(avatar.ControllingClient); 1104 destPart.GetProperties(avatar.ControllingClient);
1105 } 1105 }
@@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes
1108 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) 1108 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items)
1109 { 1109 {
1110 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); 1110 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
1111 if(profile == null || profile.RootFolder == null) 1111 if (profile == null || profile.RootFolder == null)
1112 { 1112 {
1113 m_log.ErrorFormat( 1113 m_log.ErrorFormat(
1114 "[PRIM INVENTORY]: " + 1114 "[PRIM INVENTORY]: " +
@@ -1325,8 +1325,8 @@ namespace OpenSim.Region.Environment.Scenes
1325 /// <param name="itemID"> </param> 1325 /// <param name="itemID"> </param>
1326 /// <param name="localID"></param> 1326 /// <param name="localID"></param>
1327 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param) 1327 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param)
1328 { 1328 {
1329 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId); 1329 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId);
1330 1330
1331 if (srcTaskItem == null) 1331 if (srcTaskItem == null)
1332 { 1332 {
@@ -1348,29 +1348,29 @@ namespace OpenSim.Region.Environment.Scenes
1348 destId); 1348 destId);
1349 return; 1349 return;
1350 } 1350 }
1351 1351
1352 // Must own the object, and have modify rights 1352 // Must own the object, and have modify rights
1353 if(srcPart.OwnerID != destPart.OwnerID) 1353 if (srcPart.OwnerID != destPart.OwnerID)
1354 return; 1354 return;
1355 1355
1356 if((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 1356 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
1357 return; 1357 return;
1358 1358
1359 if (destPart.ScriptAccessPin != pin) 1359 if (destPart.ScriptAccessPin != pin)
1360 { 1360 {
1361 m_log.WarnFormat( 1361 m_log.WarnFormat(
1362 "[PRIM INVENTORY]: " + 1362 "[PRIM INVENTORY]: " +
1363 "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", 1363 "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}",
1364 srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); 1364 srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin);
1365 // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - 1365 // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL -
1366 // "Object: Task Object trying to illegally load script onto task Other_Object!" 1366 // "Object: Task Object trying to illegally load script onto task Other_Object!"
1367 // How do we shout from in here? 1367 // How do we shout from in here?
1368 return; 1368 return;
1369 } 1369 }
1370 1370
1371 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1371 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1372 1372
1373 destTaskItem.ItemID = LLUUID.Random(); 1373 destTaskItem.ItemID = LLUUID.Random();
1374 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1374 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1375 destTaskItem.AssetID = srcTaskItem.AssetID; 1375 destTaskItem.AssetID = srcTaskItem.AssetID;
1376 destTaskItem.GroupID = destPart.GroupID; 1376 destTaskItem.GroupID = destPart.GroupID;
@@ -1405,25 +1405,25 @@ namespace OpenSim.Region.Environment.Scenes
1405 destTaskItem.Name = srcTaskItem.Name; 1405 destTaskItem.Name = srcTaskItem.Name;
1406 destTaskItem.InvType = srcTaskItem.InvType; 1406 destTaskItem.InvType = srcTaskItem.InvType;
1407 destTaskItem.Type = srcTaskItem.Type; 1407 destTaskItem.Type = srcTaskItem.Type;
1408 1408
1409 destPart.AddInventoryItemExclusive(destTaskItem); 1409 destPart.AddInventoryItemExclusive(destTaskItem);
1410 1410
1411 if (running > 0) 1411 if (running > 0)
1412 { 1412 {
1413 if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID)) 1413 if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID))
1414 { 1414 {
1415 destPart.CreateScriptInstance(destTaskItem, 0, false); 1415 destPart.CreateScriptInstance(destTaskItem, 0, false);
1416 } 1416 }
1417 } 1417 }
1418 1418
1419 ScenePresence avatar; 1419 ScenePresence avatar;
1420 1420
1421 if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1421 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
1422 { 1422 {
1423 destPart.GetProperties(avatar.ControllingClient); 1423 destPart.GetProperties(avatar.ControllingClient);
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 /// <summary> 1427 /// <summary>
1428 /// Called when an object is removed from the environment into inventory. 1428 /// Called when an object is removed from the environment into inventory.
1429 /// </summary> 1429 /// </summary>
@@ -1497,7 +1497,7 @@ namespace OpenSim.Region.Environment.Scenes
1497 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; 1497 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
1498 } 1498 }
1499 1499
1500 lock(m_inventoryDeletes) 1500 lock (m_inventoryDeletes)
1501 { 1501 {
1502 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder(); 1502 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder();
1503 dtis.DeRezPacket = DeRezPacket; 1503 dtis.DeRezPacket = DeRezPacket;
@@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Environment.Scenes
2246 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID) 2246 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID)
2247 { 2247 {
2248 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>(); 2248 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>();
2249 if(scriptModule == null) 2249 if (scriptModule == null)
2250 return; 2250 return;
2251 2251
2252 controllingClient.SendScriptRunningReply(objectID, itemID, 2252 controllingClient.SendScriptRunningReply(objectID, itemID,
@@ -2256,10 +2256,10 @@ namespace OpenSim.Region.Environment.Scenes
2256 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running) 2256 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running)
2257 { 2257 {
2258 SceneObjectPart part = GetSceneObjectPart(objectID); 2258 SceneObjectPart part = GetSceneObjectPart(objectID);
2259 if(part == null) 2259 if (part == null)
2260 return; 2260 return;
2261 2261
2262 if(running) 2262 if (running)
2263 EventManager.TriggerStartScript(part.LocalId, itemID); 2263 EventManager.TriggerStartScript(part.LocalId, itemID);
2264 else 2264 else
2265 EventManager.TriggerStopScript(part.LocalId, itemID); 2265 EventManager.TriggerStopScript(part.LocalId, itemID);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index fea131e..2db309a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Scenes
292 public void AddInventoryItemExclusive(TaskInventoryItem item) 292 public void AddInventoryItemExclusive(TaskInventoryItem item)
293 { 293 {
294 List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values); 294 List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values);
295 foreach(TaskInventoryItem i in il) 295 foreach (TaskInventoryItem i in il)
296 { 296 {
297 if (i.Name == item.Name) 297 if (i.Name == item.Name)
298 { 298 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 5b92a8d..2b40ad2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1,5 +1,3 @@
1#region Header
2
3/* 1/*
4 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
5 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
@@ -27,8 +25,6 @@
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 26 */
29 27
30#endregion Header
31
32using System; 28using System;
33using System.Collections.Generic; 29using System.Collections.Generic;
34using System.Drawing; 30using System.Drawing;
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 3daa680..22ca159 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1093,8 +1093,8 @@ namespace OpenSim.Region.Environment.Scenes
1093 ); 1093 );
1094 1094
1095 //look for prims with explicit sit targets that are available 1095 //look for prims with explicit sit targets that are available
1096 foreach(SceneObjectPart part in partArray) { 1096 foreach (SceneObjectPart part in partArray)
1097 1097 {
1098 // Is a sit target available? 1098 // Is a sit target available?
1099 Vector3 avSitOffSet = part.GetSitTargetPosition(); 1099 Vector3 avSitOffSet = part.GetSitTargetPosition();
1100 Quaternion avSitOrientation = part.GetSitTargetOrientation(); 1100 Quaternion avSitOrientation = part.GetSitTargetOrientation();