diff options
author | Melanie | 2010-10-23 00:21:42 +0100 |
---|---|---|
committer | Melanie | 2010-10-23 00:21:42 +0100 |
commit | 7f74dc1b14d3ef31a9f20bb3a76ef8d587779f7e (patch) | |
tree | 73f156f1f7dc7d199a946d351828c7e725ebfbda /OpenSim/Region/Framework/Scenes | |
parent | Change some exception to use ToString(). e.Message is not sufficient to fix (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-7f74dc1b14d3ef31a9f20bb3a76ef8d587779f7e.zip opensim-SC-7f74dc1b14d3ef31a9f20bb3a76ef8d587779f7e.tar.gz opensim-SC-7f74dc1b14d3ef31a9f20bb3a76ef8d587779f7e.tar.bz2 opensim-SC-7f74dc1b14d3ef31a9f20bb3a76ef8d587779f7e.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 35 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 |
2 files changed, 35 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index e923932..33069da 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -297,6 +297,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
297 | public event ChatFromClientEvent OnChatFromClient; | 297 | public event ChatFromClientEvent OnChatFromClient; |
298 | 298 | ||
299 | /// <summary> | 299 | /// <summary> |
300 | /// ChatToClientsEvent is triggered via ChatModule (or | ||
301 | /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a | ||
302 | /// received chat message if they satisfy various conditions (within audible range, etc.) | ||
303 | /// </summary> | ||
304 | public delegate void ChatToClientsEvent( | ||
305 | UUID senderID, HashSet<UUID> receiverIDs, | ||
306 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, | ||
307 | ChatSourceType src, ChatAudibleLevel level); | ||
308 | public event ChatToClientsEvent OnChatToClients; | ||
309 | |||
310 | /// <summary> | ||
300 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message | 311 | /// ChatBroadcastEvent is called via Scene when a broadcast chat message |
301 | /// from world comes in | 312 | /// from world comes in |
302 | /// </summary> | 313 | /// </summary> |
@@ -1627,6 +1638,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
1627 | } | 1638 | } |
1628 | } | 1639 | } |
1629 | } | 1640 | } |
1641 | |||
1642 | public void TriggerOnChatToClients( | ||
1643 | UUID senderID, HashSet<UUID> receiverIDs, | ||
1644 | string message, ChatTypeEnum type, Vector3 fromPos, string fromName, | ||
1645 | ChatSourceType src, ChatAudibleLevel level) | ||
1646 | { | ||
1647 | ChatToClientsEvent handler = OnChatToClients; | ||
1648 | if (handler != null) | ||
1649 | { | ||
1650 | foreach (ChatToClientsEvent d in handler.GetInvocationList()) | ||
1651 | { | ||
1652 | try | ||
1653 | { | ||
1654 | d(senderID, receiverIDs, message, type, fromPos, fromName, src, level); | ||
1655 | } | ||
1656 | catch (Exception e) | ||
1657 | { | ||
1658 | m_log.ErrorFormat( | ||
1659 | "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}", | ||
1660 | e.Message, e.StackTrace); | ||
1661 | } | ||
1662 | } | ||
1663 | } | ||
1664 | } | ||
1630 | 1665 | ||
1631 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) | 1666 | public void TriggerOnChatBroadcast(Object sender, OSChatMessage chat) |
1632 | { | 1667 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 06e3c0e..618f425 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3329,8 +3329,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3329 | 3329 | ||
3330 | public void CopyTo(AgentData cAgent) | 3330 | public void CopyTo(AgentData cAgent) |
3331 | { | 3331 | { |
3332 | cAgent.CallbackURI = m_callbackURI; | ||
3333 | |||
3334 | cAgent.AgentID = UUID; | 3332 | cAgent.AgentID = UUID; |
3335 | cAgent.RegionID = Scene.RegionInfo.RegionID; | 3333 | cAgent.RegionID = Scene.RegionInfo.RegionID; |
3336 | 3334 | ||