diff options
author | Melanie Thielker | 2008-11-01 18:18:19 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-01 18:18:19 +0000 |
commit | 388c053dcb8de3d9b89c99989af1990296cf2001 (patch) | |
tree | a1d12cae14606bf30a59532de7d6e996a51f469e /OpenSim/Region/Environment/Scenes | |
parent | Revert last checkin. Avatars fall through non-physical prims now. (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EventManager.cs | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index c629faf..99aac93 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs | |||
@@ -135,13 +135,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
135 | 135 | ||
136 | public event SignificantClientMovement OnSignificantClientMovement; | 136 | public event SignificantClientMovement OnSignificantClientMovement; |
137 | 137 | ||
138 | public delegate void NewGridInstantMessage(GridInstantMessage message); | 138 | public delegate void NewGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule); |
139 | 139 | ||
140 | public event NewGridInstantMessage OnGridInstantMessageToIMModule; | 140 | public event NewGridInstantMessage OnGridInstantMessage; |
141 | |||
142 | public event NewGridInstantMessage OnGridInstantMessageToFriendsModule; | ||
143 | |||
144 | public event NewGridInstantMessage OnGridInstantMessageToGroupsModule; | ||
145 | 141 | ||
146 | public delegate void ClientClosed(UUID clientID); | 142 | public delegate void ClientClosed(UUID clientID); |
147 | 143 | ||
@@ -346,8 +342,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
346 | private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded; | 342 | private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded; |
347 | private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved; | 343 | private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved; |
348 | private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel; | 344 | private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel; |
349 | private NewGridInstantMessage handlerGridInstantMessageToIM = null; //OnGridInstantMessageToIMModule; | 345 | private NewGridInstantMessage handlerGridInstantMessage = null; //OnGridInstantMessage; |
350 | private NewGridInstantMessage handlerGridInstantMessageToFriends = null; //OnGridInstantMessageToFriendsModule; | ||
351 | private ClientClosed handlerClientClosed = null; //OnClientClosed; | 346 | private ClientClosed handlerClientClosed = null; //OnClientClosed; |
352 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; | 347 | private OnMakeChildAgentDelegate handlerMakeChildAgent = null; //OnMakeChildAgent; |
353 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; | 348 | private OnMakeRootAgentDelegate handlerMakeRootAgent = null; //OnMakeRootAgent; |
@@ -635,21 +630,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
635 | ///<param name="whichModule">A bit vector containing the modules to send the message to</param> | 630 | ///<param name="whichModule">A bit vector containing the modules to send the message to</param> |
636 | public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule) | 631 | public void TriggerGridInstantMessage(GridInstantMessage message, InstantMessageReceiver whichModule) |
637 | { | 632 | { |
638 | if ((whichModule & InstantMessageReceiver.IMModule) != 0) | 633 | handlerGridInstantMessage = OnGridInstantMessage; |
639 | { | 634 | if (handlerGridInstantMessage != null) |
640 | handlerGridInstantMessageToIM = OnGridInstantMessageToIMModule; | ||
641 | if (handlerGridInstantMessageToIM != null) | ||
642 | { | ||
643 | handlerGridInstantMessageToIM(message); | ||
644 | } | ||
645 | } | ||
646 | if ((whichModule & InstantMessageReceiver.FriendsModule) != 0) | ||
647 | { | 635 | { |
648 | handlerGridInstantMessageToFriends = OnGridInstantMessageToFriendsModule; | 636 | handlerGridInstantMessage(message, whichModule); |
649 | if (handlerGridInstantMessageToFriends != null) | ||
650 | { | ||
651 | handlerGridInstantMessageToFriends(message); | ||
652 | } | ||
653 | } | 637 | } |
654 | } | 638 | } |
655 | 639 | ||