diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs index ce2d339..4427426 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | |||
@@ -25,28 +25,26 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Reflection; | ||
30 | using System.Collections; | 28 | using System.Collections; |
31 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
32 | 30 | using System.Security; | |
33 | using OpenMetaverse; | 31 | using OpenMetaverse; |
34 | using OpenSim.Region.Framework.Scenes; | 32 | using OpenSim.Region.Framework.Scenes; |
35 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
36 | 34 | ||
37 | using log4net; | ||
38 | |||
39 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 35 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
40 | { | 36 | { |
41 | class SPAvatar : System.MarshalByRefObject, IAvatar | 37 | class SPAvatar : System.MarshalByRefObject, IAvatar |
42 | { | 38 | { |
43 | private readonly Scene m_rootScene; | 39 | private readonly Scene m_rootScene; |
44 | private readonly UUID m_ID; | 40 | private readonly UUID m_ID; |
41 | private readonly ISecurityCredential m_security; | ||
45 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 43 | ||
47 | public SPAvatar(Scene scene, UUID ID) | 44 | public SPAvatar(Scene scene, UUID ID, ISecurityCredential security) |
48 | { | 45 | { |
49 | m_rootScene = scene; | 46 | m_rootScene = scene; |
47 | m_security = security; | ||
50 | m_ID = ID; | 48 | m_ID = ID; |
51 | } | 49 | } |
52 | 50 | ||
@@ -58,7 +56,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
58 | public string Name | 56 | public string Name |
59 | { | 57 | { |
60 | get { return GetSP().Name; } | 58 | get { return GetSP().Name; } |
61 | set { throw new InvalidOperationException("Avatar Names are a read-only property."); } | 59 | set { throw new SecurityException("Avatar Names are a read-only property."); } |
62 | } | 60 | } |
63 | 61 | ||
64 | public UUID GlobalID | 62 | public UUID GlobalID |
@@ -84,7 +82,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
84 | foreach (DictionaryEntry element in internalAttachments) | 82 | foreach (DictionaryEntry element in internalAttachments) |
85 | { | 83 | { |
86 | Hashtable attachInfo = (Hashtable)element.Value; | 84 | Hashtable attachInfo = (Hashtable)element.Value; |
87 | attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int)element.Key, new UUID((string)attachInfo["item"]), new UUID((string)attachInfo["asset"]))); | 85 | attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int) element.Key, |
86 | new UUID((string) attachInfo["item"]), | ||
87 | new UUID((string) attachInfo["asset"]), m_security)); | ||
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||