aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneEvents.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneEvents.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index a6a8fb6..5bf23ac 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -27,12 +27,14 @@
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
30using System;
30using OpenSim.Framework; 31using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
32using OpenSim.Region.Environment.LandManagement; 33using OpenSim.Region.Environment.LandManagement;
33 34
34namespace OpenSim.Region.Environment.Scenes 35namespace OpenSim.Region.Environment.Scenes
35{ 36{
37
36 /// <summary> 38 /// <summary>
37 /// A class for triggering remote scene events. 39 /// A class for triggering remote scene events.
38 /// </summary> 40 /// </summary>
@@ -115,6 +117,16 @@ namespace OpenSim.Region.Environment.Scenes
115 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; 117 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
116 118
117 119
120 public delegate void NewGridInstantMessage(GridInstantMessage message);
121
122 public event NewGridInstantMessage OnGridInstantMessageToIMModule;
123
124 public event NewGridInstantMessage OnGridInstantMessageToFriendsModule;
125
126 public event NewGridInstantMessage OnGridInstantMessageToGroupsModule;
127
128
129
118 public void TriggerOnClientMovement(ScenePresence avatar) 130 public void TriggerOnClientMovement(ScenePresence avatar)
119 { 131 {
120 if (OnClientMovement != null) 132 if (OnClientMovement != null)
@@ -265,5 +277,29 @@ namespace OpenSim.Region.Environment.Scenes
265 OnAvatarEnteringNewParcel(avatar, localLandID, regionID); 277 OnAvatarEnteringNewParcel(avatar, localLandID, regionID);
266 } 278 }
267 } 279 }
280
281 ///<summary>Used to pass instnat messages around between the Scene, the Friends Module and the Instant Messsage Module</summary>
282 ///<param name="message">Object containing the Instant Message Data</param>
283 ///<param name="whichModule">A bit vector containing the modules to send the message to</param>
284 public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule)
285 {
286 if ((whichModule & InstantMessageReceiver.IMModule) != 0)
287 {
288
289 if (OnGridInstantMessageToIMModule != null)
290 {
291 OnGridInstantMessageToIMModule(message);
292 }
293 }
294 if ((whichModule & InstantMessageReceiver.FriendsModule) != 0)
295 {
296 if (OnGridInstantMessageToFriendsModule != null)
297 {
298 OnGridInstantMessageToFriendsModule(message);
299 }
300
301 }
302 }
303
268 } 304 }
269} \ No newline at end of file 305} \ No newline at end of file