diff options
author | Dr Scofield | 2008-05-23 10:24:26 +0000 |
---|---|---|
committer | Dr Scofield | 2008-05-23 10:24:26 +0000 |
commit | bf23e5d66cf091d310c660877380f3727d0b0234 (patch) | |
tree | 79126b3d3a900d47cae0bf6a59f19de22a0faada /OpenSim/Region/Environment/Scenes/EventManager.cs | |
parent | Thank you kindly, Melanie, for: (diff) | |
download | opensim-SC_OLD-bf23e5d66cf091d310c660877380f3727d0b0234.zip opensim-SC_OLD-bf23e5d66cf091d310c660877380f3727d0b0234.tar.gz opensim-SC_OLD-bf23e5d66cf091d310c660877380f3727d0b0234.tar.bz2 opensim-SC_OLD-bf23e5d66cf091d310c660877380f3727d0b0234.tar.xz |
i've refactored the ChatModule into two modules: ChatModule and IRCBridgeModule.
ChatModule is now only doing in-world chat. IRCBridgeModule is only doing, well,
bridging chat to/from IRC. Both modules are now using a new OnChatFromWorld event
handler (which Scene.PacketHandler is feeding for chat from in-world instead of
going via the Interface method). This refactoring will allow us to easily add
other bridge modules (e.g., an XMPP bridge module).
there is still a bug in IRCBridgeModule (inherited from the old ChatModule)
where FindClientRegion does not really find the client region...
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EventManager.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index 7ff9213..e0a24a6 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs | |||
@@ -182,6 +182,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
182 | /// </summary> | 182 | /// </summary> |
183 | public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); | 183 | public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); |
184 | public event DeregisterCapsEvent OnDeregisterCaps; | 184 | public event DeregisterCapsEvent OnDeregisterCaps; |
185 | /// <summary> | ||
186 | /// ChatFromWorldEvent is called via Scene when a chat message | ||
187 | /// from world comes in (chat from viewer is available via | ||
188 | /// client.OnChatFromViewer). | ||
189 | /// </summary> | ||
190 | public delegate void ChatFromWorldEvent(Object sender, ChatFromViewerArgs chat); | ||
191 | public event ChatFromWorldEvent OnChatFromWorld; | ||
185 | 192 | ||
186 | public class MoneyTransferArgs : EventArgs | 193 | public class MoneyTransferArgs : EventArgs |
187 | { | 194 | { |
@@ -283,6 +290,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; | 290 | private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; |
284 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; | 291 | private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; |
285 | private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; | 292 | private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; |
293 | private ChatFromWorldEvent handlerChatFromWorld = null; // OnChatFromWorld; | ||
286 | private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; | 294 | private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; |
287 | private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight | 295 | private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight |
288 | private ScriptControlEvent handlerScriptControlEvent = null; | 296 | private ScriptControlEvent handlerScriptControlEvent = null; |
@@ -625,6 +633,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
625 | 633 | ||
626 | } | 634 | } |
627 | } | 635 | } |
636 | |||
637 | public void TriggerOnChatFromWorld(Object sender, ChatFromViewerArgs chat) | ||
638 | { | ||
639 | handlerChatFromWorld = OnChatFromWorld; | ||
640 | if (handlerChatFromWorld != null) | ||
641 | { | ||
642 | handlerChatFromWorld(sender, chat); | ||
643 | } | ||
644 | } | ||
645 | |||
628 | internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed) | 646 | internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed) |
629 | { | 647 | { |
630 | handlerScriptControlEvent = OnScriptControlEvent; | 648 | handlerScriptControlEvent = OnScriptControlEvent; |