aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs35
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs10
3 files changed, 38 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 437b91a..4feb3fc 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 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2750168..ef18d02 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -599,8 +599,6 @@ namespace OpenSim.Region.Framework.Scenes
599 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 599 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
600 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 600 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
601 601
602 StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity);
603
604 // Old 602 // Old
605 /* 603 /*
606 m_simulatorVersion = simulatorVersion 604 m_simulatorVersion = simulatorVersion
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index fd23294..87dcdee 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
108 private int m_activeScripts = 0; 108 private int m_activeScripts = 0;
109 private int m_scriptLinesPerSecond = 0; 109 private int m_scriptLinesPerSecond = 0;
110 110
111 private int objectCapacity = 45000; 111 private int m_objectCapacity = 45000;
112 112
113 private Scene m_scene; 113 private Scene m_scene;
114 114
@@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
124 m_scene = scene; 124 m_scene = scene;
125 ReportingRegion = scene.RegionInfo; 125 ReportingRegion = scene.RegionInfo;
126 126
127 m_objectCapacity = scene.RegionInfo.ObjectCapacity;
127 m_report.AutoReset = true; 128 m_report.AutoReset = true;
128 m_report.Interval = statsUpdatesEveryMS; 129 m_report.Interval = statsUpdatesEveryMS;
129 m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat); 130 m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat);
@@ -271,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes
271 272
272 SimStats simStats 273 SimStats simStats
273 = new SimStats( 274 = new SimStats(
274 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID); 275 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID);
275 276
276 handlerSendStatResult = OnSendStatsResult; 277 handlerSendStatResult = OnSendStatsResult;
277 if (handlerSendStatResult != null) 278 if (handlerSendStatResult != null)
@@ -435,11 +436,6 @@ namespace OpenSim.Region.Framework.Scenes
435 m_activeScripts = count; 436 m_activeScripts = count;
436 } 437 }
437 438
438 public void SetObjectCapacity(int objects)
439 {
440 objectCapacity = objects;
441 }
442
443 /// <summary> 439 /// <summary>
444 /// This is for llGetRegionFPS 440 /// This is for llGetRegionFPS
445 /// </summary> 441 /// </summary>