aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Friends
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-01 18:18:19 +0000
committerMelanie Thielker2008-11-01 18:18:19 +0000
commit388c053dcb8de3d9b89c99989af1990296cf2001 (patch)
treea1d12cae14606bf30a59532de7d6e996a51f469e /OpenSim/Region/Environment/Modules/Avatar/Friends
parentRevert last checkin. Avatars fall through non-physical prims now. (diff)
downloadopensim-SC-388c053dcb8de3d9b89c99989af1990296cf2001.zip
opensim-SC-388c053dcb8de3d9b89c99989af1990296cf2001.tar.gz
opensim-SC-388c053dcb8de3d9b89c99989af1990296cf2001.tar.bz2
opensim-SC-388c053dcb8de3d9b89c99989af1990296cf2001.tar.xz
Make the IM and friends modules optional. Clean up some code that dealt
with the old Grid Instant Message over OGS1. Refactor the EventManager to be independent of the rigid module structure design imposed by the current implementation. Message routing is now done in the destination module rather than in the event manager. This way, more or less granular solutions are possible without core changes.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Friends')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index c51bcc1..a380700 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
67 m_scene.Add(scene); 67 m_scene.Add(scene);
68 } 68 }
69 scene.EventManager.OnNewClient += OnNewClient; 69 scene.EventManager.OnNewClient += OnNewClient;
70 scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; 70 scene.EventManager.OnGridInstantMessage += OnGridInstantMessage;
71 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 71 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
72 scene.EventManager.OnMakeChildAgent += MakeChildAgent; 72 scene.EventManager.OnMakeChildAgent += MakeChildAgent;
73 scene.EventManager.OnClientClosed += ClientLoggedOut; 73 scene.EventManager.OnClientClosed += ClientLoggedOut;
@@ -620,8 +620,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
620 // TODO: Inform the client that the ExFriend is offline 620 // TODO: Inform the client that the ExFriend is offline
621 } 621 }
622 622
623 private void OnGridInstantMessage(GridInstantMessage msg) 623 private void OnGridInstantMessage(GridInstantMessage msg, InstantMessageReceiver whichModule)
624 { 624 {
625 if ((whichModule & InstantMessageReceiver.FriendsModule) == 0)
626 return;
627
625 // Trigger the above event handler 628 // Trigger the above event handler
626 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), 629 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
627 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 630 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,