diff options
author | Adam Frisby | 2009-08-16 22:01:18 +1000 |
---|---|---|
committer | Adam Frisby | 2009-08-16 22:01:18 +1000 |
commit | cbd454d69231598daf6748070fb5f0baace61c59 (patch) | |
tree | 1ffe2cf69c0dea3df82a0b639d287e9585180e15 /OpenSim/Region | |
parent | * Refactor: Moves IAvatarAttachment into IAvatarAttachment.cs instead of IAva... (diff) | |
download | opensim-SC_OLD-cbd454d69231598daf6748070fb5f0baace61c59.zip opensim-SC_OLD-cbd454d69231598daf6748070fb5f0baace61c59.tar.gz opensim-SC_OLD-cbd454d69231598daf6748070fb5f0baace61c59.tar.bz2 opensim-SC_OLD-cbd454d69231598daf6748070fb5f0baace61c59.tar.xz |
* Implements ISecurityCredential member on SPAvatar, SPAvatarAttachment
* Disables 'event not used' warning for IRCClientView; cuts OpenSim total warnings back.
Diffstat (limited to 'OpenSim/Region')
5 files changed, 17 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a3be181..4a2d7b5 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -634,7 +634,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
634 | { | 634 | { |
635 | get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } | 635 | get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } |
636 | } | 636 | } |
637 | 637 | #pragma warning disable 67 | |
638 | public event GenericMessage OnGenericMessage; | 638 | public event GenericMessage OnGenericMessage; |
639 | public event ImprovedInstantMessage OnInstantMessage; | 639 | public event ImprovedInstantMessage OnInstantMessage; |
640 | public event ChatMessage OnChatFromClient; | 640 | public event ChatMessage OnChatFromClient; |
@@ -826,6 +826,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
826 | public event AvatarNotesUpdate OnAvatarNotesUpdate; | 826 | public event AvatarNotesUpdate OnAvatarNotesUpdate; |
827 | public event MuteListRequest OnMuteListRequest; | 827 | public event MuteListRequest OnMuteListRequest; |
828 | public event PlacesQuery OnPlacesQuery; | 828 | public event PlacesQuery OnPlacesQuery; |
829 | #pragma warning restore 67 | ||
829 | 830 | ||
830 | public void SetDebugPacketLevel(int newDebug) | 831 | public void SetDebugPacketLevel(int newDebug) |
831 | { | 832 | { |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index bdc7a15..35b0a0f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
117 | if (_OnTouchActive && m_localID == localID) | 117 | if (_OnTouchActive && m_localID == localID) |
118 | { | 118 | { |
119 | TouchEventArgs e = new TouchEventArgs(); | 119 | TouchEventArgs e = new TouchEventArgs(); |
120 | e.Avatar = new SPAvatar(m_rootScene, remoteClient.AgentId); | 120 | e.Avatar = new SPAvatar(m_rootScene, remoteClient.AgentId, m_security); |
121 | e.TouchBiNormal = surfaceArgs.Binormal; | 121 | e.TouchBiNormal = surfaceArgs.Binormal; |
122 | e.TouchMaterialIndex = surfaceArgs.FaceIndex; | 122 | e.TouchMaterialIndex = surfaceArgs.FaceIndex; |
123 | e.TouchNormal = surfaceArgs.Normal; | 123 | e.TouchNormal = surfaceArgs.Normal; |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs index ce2d339..4600836 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs | |||
@@ -42,11 +42,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
42 | { | 42 | { |
43 | private readonly Scene m_rootScene; | 43 | private readonly Scene m_rootScene; |
44 | private readonly UUID m_ID; | 44 | private readonly UUID m_ID; |
45 | private readonly ISecurityCredential m_security; | ||
45 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 47 | ||
47 | public SPAvatar(Scene scene, UUID ID) | 48 | public SPAvatar(Scene scene, UUID ID, ISecurityCredential security) |
48 | { | 49 | { |
49 | m_rootScene = scene; | 50 | m_rootScene = scene; |
51 | m_security = security; | ||
50 | m_ID = ID; | 52 | m_ID = ID; |
51 | } | 53 | } |
52 | 54 | ||
@@ -84,7 +86,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
84 | foreach (DictionaryEntry element in internalAttachments) | 86 | foreach (DictionaryEntry element in internalAttachments) |
85 | { | 87 | { |
86 | Hashtable attachInfo = (Hashtable)element.Value; | 88 | 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"]))); | 89 | attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int) element.Key, |
90 | new UUID((string) attachInfo["item"]), | ||
91 | new UUID((string) attachInfo["asset"]), m_security)); | ||
88 | } | 92 | } |
89 | } | 93 | } |
90 | 94 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs index 9b684fe..570459a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs | |||
@@ -39,10 +39,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
39 | private readonly int m_location; | 39 | private readonly int m_location; |
40 | //private readonly UUID m_itemId; | 40 | //private readonly UUID m_itemId; |
41 | private readonly UUID m_assetId; | 41 | private readonly UUID m_assetId; |
42 | |||
43 | private readonly ISecurityCredential m_security; | ||
42 | 44 | ||
43 | public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId) | 45 | public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security) |
44 | { | 46 | { |
45 | m_rootScene = rootScene; | 47 | m_rootScene = rootScene; |
48 | m_security = security; | ||
46 | //m_parent = self; | 49 | //m_parent = self; |
47 | m_location = location; | 50 | m_location = location; |
48 | //m_itemId = itemId; | 51 | //m_itemId = itemId; |
@@ -55,7 +58,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
55 | { | 58 | { |
56 | get | 59 | get |
57 | { | 60 | { |
58 | return new SOPObject(m_rootScene, m_rootScene.GetSceneObjectPart(m_assetId).LocalId); | 61 | return new SOPObject(m_rootScene, m_rootScene.GetSceneObjectPart(m_assetId).LocalId, m_security); |
59 | } | 62 | } |
60 | } | 63 | } |
61 | } | 64 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs index 497ca39..da5ea0d 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
86 | if (_OnNewUser != null) | 86 | if (_OnNewUser != null) |
87 | { | 87 | { |
88 | NewUserEventArgs e = new NewUserEventArgs(); | 88 | NewUserEventArgs e = new NewUserEventArgs(); |
89 | e.Avatar = new SPAvatar(m_internalScene, presence.UUID); | 89 | e.Avatar = new SPAvatar(m_internalScene, presence.UUID, m_security); |
90 | _OnNewUser(this, e); | 90 | _OnNewUser(this, e); |
91 | } | 91 | } |
92 | } | 92 | } |
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
156 | if (chat.Sender != null && chat.SenderObject == null) | 156 | if (chat.Sender != null && chat.SenderObject == null) |
157 | { | 157 | { |
158 | ChatEventArgs e = new ChatEventArgs(); | 158 | ChatEventArgs e = new ChatEventArgs(); |
159 | e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID); | 159 | e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); |
160 | e.Text = chat.Message; | 160 | e.Text = chat.Message; |
161 | 161 | ||
162 | _OnChat(this, e); | 162 | _OnChat(this, e); |
@@ -209,7 +209,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
209 | for (int i = 0; i < ents.Count; i++) | 209 | for (int i = 0; i < ents.Count; i++) |
210 | { | 210 | { |
211 | EntityBase ent = ents[i]; | 211 | EntityBase ent = ents[i]; |
212 | rets[i] = new SPAvatar(m_internalScene, ent.UUID); | 212 | rets[i] = new SPAvatar(m_internalScene, ent.UUID, m_security); |
213 | } | 213 | } |
214 | 214 | ||
215 | return rets; | 215 | return rets; |