diff --git a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
index b55ba26d1b..45c62bddc9 100644
--- a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs
@@ -79,6 +79,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 014c536b24..8fbe77fa66 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 134946b473..e73d4d243a 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);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1afa08d138..f2a84747bc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5722,6 +5722,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel)
{
+ IDialogModule dm = World.RequestModuleInterface();
+
+ if (dm == null)
+ return;
+
m_host.AddScriptLPS(1);
UUID av = new UUID();
if (!UUID.TryParse(avatar,out av))
@@ -5749,7 +5754,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
buts[i] = buttons.Data[i].ToString();
}
- World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
+
+ dm.SendDialogToUser(
+ av, m_host.Name, m_host.UUID, m_host.OwnerID,
+ message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
+
// ScriptSleep(1000);
}