From 17f783457b8dbd182f8184ef77c72d57d7c8da8b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 8 Jan 2009 18:50:46 +0000
Subject: * refactor: move code for sending a message to all users in a region
to the DialogModule
---
OpenSim/Region/Environment/Scenes/Scene.cs | 36 +++++++-----------------------
1 file changed, 8 insertions(+), 28 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
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
m_incrementsof15seconds = (int)seconds / 15;
m_RestartTimerCounter = 0;
m_restartTimer.AutoReset = true;
- m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
- m_log.Error("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
+ m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
+ m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
m_restartTimer.Start();
- SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
- //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
+ m_dialogModule.SendNotificationToUsersInRegion(
+ UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
}
}
@@ -577,11 +577,10 @@ namespace OpenSim.Region.Environment.Scenes
if (m_RestartTimerCounter <= m_incrementsof15seconds)
{
if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
- SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " +
- ((8 - m_RestartTimerCounter) * 15) + " seconds");
-
- // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) +
- //" seconds");
+ m_dialogModule.SendNotificationToUsersInRegion(
+ UUID.Random(),
+ String.Empty,
+ RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter) * 15) + " seconds");
}
else
{
@@ -3477,25 +3476,6 @@ namespace OpenSim.Region.Environment.Scenes
///
/// Sends a Big Blue Box message on the upper right of the screen to the client
- /// for all agents in the region
- ///
- /// The person sending the message
- /// The session of the person sending the message
- /// The name of the person doing the sending
- /// The Message being sent to the user
- public void SendRegionMessageFromEstateTools(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
- {
- List presenceList = GetScenePresences();
-
- foreach (ScenePresence presence in presenceList)
- {
- if (!presence.IsChildAgent)
- presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, FromAvatarName, Message);
- }
- }
-
- ///
- /// Sends a Big Blue Box message on the upper right of the screen to the client
/// for all agents in the estate
///
/// The person sending the message
--
cgit v1.1