From 9a97a6866ffeae85e959747195c139bfdbcac0e7 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 8 Jan 2009 19:05:22 +0000
Subject: * refactor: move estate dialog to DialogModule * This appeared only
to be implemented for the region, and doesn't currently seem to work anyway
---
OpenSim/Region/Environment/Interfaces/IDialogModule.cs | 15 ++++++++++++++-
.../Environment/Modules/Avatar/Dialog/DialogModule.cs | 10 +++++++++-
.../Modules/World/Estate/EstateManagementModule.cs | 11 ++++++++---
3 files changed, 31 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
index 4a648d6..b55ba26 100644
--- a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
@@ -90,6 +90,19 @@ namespace OpenSim.Region.Environment.Interfaces
/// The user sending the message
/// The name of the user doing the sending
/// The message being sent to the user
- void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message);
+ void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message);
+
+ ///
+ /// Send a notification to all users in the estate. This notification should remain around until the
+ /// user explicitly dismisses it.
+ ///
+ ///
+ /// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the
+ /// screen.
+ ///
+ /// The user sending the message
+ /// The name of the user doing the sending
+ /// The message being sent to the user
+ void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message);
}
}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
index b64ec71..014c536 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
@@ -99,7 +99,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog
if (!presence.IsChildAgent)
presence.ControllingClient.SendAlertMessage(message);
}
- }
+ }
+
+ public void SendNotificationToUsersInEstate(
+ UUID fromAvatarID, string fromAvatarName, string message)
+ {
+ // TODO: This does not yet do what it says on the tin - it only sends the message to users in the same
+ // region as the sending avatar.
+ SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message);
+ }
public void SendNotificationToUsersInRegion(
UUID fromAvatarID, string fromAvatarName, string message)
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 33e354e..d906bbd 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -352,7 +352,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
}
}
- private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
+ private void SendSimulatorBlueBoxMessage(
+ IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
{
IDialogModule dm = m_scene.RequestModuleInterface();
@@ -360,9 +361,13 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
dm.SendNotificationToUsersInRegion(senderID, senderName, message);
}
- private void SendEstateBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
+ private void SendEstateBlueBoxMessage(
+ IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
{
- m_scene.SendEstateMessageFromEstateTools(senderID, sessionID, senderName, message);
+ IDialogModule dm = m_scene.RequestModuleInterface();
+
+ if (dm != null)
+ dm.SendNotificationToUsersInEstate(senderID, senderName, message);
}
private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics)
--
cgit v1.1