diff options
author | Master ScienceSim | 2010-10-28 09:09:42 -0700 |
---|---|---|
committer | Master ScienceSim | 2010-10-28 09:09:42 -0700 |
commit | f2c1d0e34feba801ff85c35ee049ed6d3067bb0d (patch) | |
tree | ff692ecc0db2b9cdf4cacd5a42234a5bb58ddd34 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Added background thread to handle delayed send and save of appearance (diff) | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.zip opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.tar.gz opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.tar.bz2 opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.tar.xz |
Merge branch 'opensim-master' into dev-appearance
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 437b91a..c321a15 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -293,6 +293,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
293 | public event ChatFromClientEvent OnChatFromClient; | 293 | public event ChatFromClientEvent OnChatFromClient; |
294 | 294 | ||
295 | /// <summary> | 295 | /// <summary> |
296 | /// ChatToClientsEvent is triggered via ChatModule (or | ||
297 | /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a | ||
298 | /// received chat message if they satisfy various conditions (within audible range, etc.) | ||
299 | /// </summary> | ||
300 | public delegate void ChatToClientsEvent( | ||
301 | UUID senderID, HashSet<UUID> receiverIDs, | ||
302 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, | ||
303 | ChatSourceType src, ChatAudibleLevel level); | ||
304 | public event ChatToClientsEvent OnChatToClients; | ||
305 | |||
306 | /// <summary> | ||
296 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message | 307 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message |
297 | /// from world comes in | 308 | /// from world comes in |
298 | /// </summary> | 309 | /// </summary> |
@@ -1603,6 +1614,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
1603 | } | 1614 | } |
1604 | } | 1615 | } |
1605 | } | 1616 | } |
1617 | |||
1618 | public void TriggerOnChatToClients( | ||
1619 | UUID senderID, HashSet<UUID> receiverIDs, | ||
1620 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, | ||
1621 | ChatSourceType src, ChatAudibleLevel level) | ||
1622 | { | ||
1623 | ChatToClientsEvent handler = OnChatToClients; | ||
1624 | if (handler != null) | ||
1625 | { | ||
1626 | foreach (ChatToClientsEvent d in handler.GetInvocationList()) | ||
1627 | { | ||
1628 | try | ||
1629 | { | ||
1630 | d(senderID, receiverIDs, message, type, fromPos, fromName, src, level); | ||
1631 | } | ||
1632 | catch (Exception e) | ||
1633 | { | ||
1634 | m_log.ErrorFormat( | ||
1635 | "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}", | ||
1636 | e.Message, e.StackTrace); | ||
1637 | } | ||
1638 | } | ||
1639 | } | ||
1640 | } | ||
1606 | 1641 | ||
1607 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) | 1642 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) |
1608 | { | 1643 | { |