From e7bb27b5bd9ae459096f1c2282a558ee872bc0c5 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 8 Jan 2009 19:14:52 +0000
Subject: * refactor: move code to send a dialog to a user from scene to
DialogModule
---
OpenSim/Region/Environment/Interfaces/IDialogModule.cs | 15 +++++++++++++++
.../Environment/Modules/Avatar/Dialog/DialogModule.cs | 10 ++++++++++
OpenSim/Region/Environment/Scenes/Scene.cs | 12 ------------
3 files changed, 25 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
index b55ba26..45c62bd 100644
--- a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
@@ -80,6 +80,21 @@ namespace OpenSim.Region.Environment.Interfaces
void SendGeneralAlert(string message);
///
+ /// Send a dialog box to a particular user.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ void SendDialogToUser(
+ UUID avatarID, string objectName, UUID objectID, UUID ownerID,
+ string message, UUID textureID, int ch, string[] buttonlabels);
+
+ ///
/// Send a notification to all users in the scene. This notification should remain around until the
/// user explicitly dismisses it.
///
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
index 014c536..8fbe77f 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs
@@ -101,6 +101,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog
}
}
+ public void SendDialogToUser(
+ UUID avatarID, string objectName, UUID objectID, UUID ownerID,
+ string message, UUID textureID, int ch, string[] buttonlabels)
+ {
+ ScenePresence sp = m_scene.GetScenePresence(avatarID);
+
+ if (sp != null)
+ sp.ControllingClient.SendDialog(objectName, objectID, ownerID, message, textureID, ch, buttonlabels);
+ }
+
public void SendNotificationToUsersInEstate(
UUID fromAvatarID, string fromAvatarName, string message)
{
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 134946b..e73d4d2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -3377,18 +3377,6 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public void SendDialogToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string message, UUID TextureID, int ch, string[] buttonlabels)
- {
- lock (m_scenePresences)
- {
- if (m_scenePresences.ContainsKey(avatarID))
- {
- m_scenePresences[avatarID].ControllingClient.SendDialog(
- objectName, objectID, ownerID, message, TextureID, ch, buttonlabels);
- }
- }
- }
-
public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms)
{
m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms);
--
cgit v1.1