aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-08 18:50:46 +0000
committerJustin Clarke Casey2009-01-08 18:50:46 +0000
commit17f783457b8dbd182f8184ef77c72d57d7c8da8b (patch)
tree2ab67061f34d29f724ee13ebec4a9ca884cdd5da /OpenSim/Region/Environment/Scenes/Scene.cs
parentUpdate svn properties, minor formatting cleanup. (diff)
downloadopensim-SC_OLD-17f783457b8dbd182f8184ef77c72d57d7c8da8b.zip
opensim-SC_OLD-17f783457b8dbd182f8184ef77c72d57d7c8da8b.tar.gz
opensim-SC_OLD-17f783457b8dbd182f8184ef77c72d57d7c8da8b.tar.bz2
opensim-SC_OLD-17f783457b8dbd182f8184ef77c72d57d7c8da8b.tar.xz
* refactor: move code for sending a message to all users in a region to the DialogModule
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs36
1 files changed, 8 insertions, 28 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index dea265e..134946b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -559,11 +559,11 @@ namespace OpenSim.Region.Environment.Scenes
559 m_incrementsof15seconds = (int)seconds / 15; 559 m_incrementsof15seconds = (int)seconds / 15;
560 m_RestartTimerCounter = 0; 560 m_RestartTimerCounter = 0;
561 m_restartTimer.AutoReset = true; 561 m_restartTimer.AutoReset = true;
562 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 562 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
563 m_log.Error("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 563 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
564 m_restartTimer.Start(); 564 m_restartTimer.Start();
565 SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); 565 m_dialogModule.SendNotificationToUsersInRegion(
566 //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); 566 UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
567 } 567 }
568 } 568 }
569 569
@@ -577,11 +577,10 @@ namespace OpenSim.Region.Environment.Scenes
577 if (m_RestartTimerCounter <= m_incrementsof15seconds) 577 if (m_RestartTimerCounter <= m_incrementsof15seconds)
578 { 578 {
579 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) 579 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
580 SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + 580 m_dialogModule.SendNotificationToUsersInRegion(
581 ((8 - m_RestartTimerCounter) * 15) + " seconds"); 581 UUID.Random(),
582 582 String.Empty,
583 // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + 583 RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter) * 15) + " seconds");
584 //" seconds");
585 } 584 }
586 else 585 else
587 { 586 {
@@ -3477,25 +3476,6 @@ namespace OpenSim.Region.Environment.Scenes
3477 3476
3478 /// <summary> 3477 /// <summary>
3479 /// Sends a Big Blue Box message on the upper right of the screen to the client 3478 /// Sends a Big Blue Box message on the upper right of the screen to the client
3480 /// for all agents in the region
3481 /// </summary>
3482 /// <param name="FromAvatarID">The person sending the message</param>
3483 /// <param name="fromSessionID">The session of the person sending the message</param>
3484 /// <param name="FromAvatarName">The name of the person doing the sending</param>
3485 /// <param name="Message">The Message being sent to the user</param>
3486 public void SendRegionMessageFromEstateTools(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
3487 {
3488 List<ScenePresence> presenceList = GetScenePresences();
3489
3490 foreach (ScenePresence presence in presenceList)
3491 {
3492 if (!presence.IsChildAgent)
3493 presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, FromAvatarName, Message);
3494 }
3495 }
3496
3497 /// <summary>
3498 /// Sends a Big Blue Box message on the upper right of the screen to the client
3499 /// for all agents in the estate 3479 /// for all agents in the estate
3500 /// </summary> 3480 /// </summary>
3501 /// <param name="FromAvatarID">The person sending the message</param> 3481 /// <param name="FromAvatarID">The person sending the message</param>