diff options
Diffstat (limited to 'OpenSim')
4 files changed, 35 insertions, 13 deletions
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 | |||
80 | void SendGeneralAlert(string message); | 80 | void SendGeneralAlert(string message); |
81 | 81 | ||
82 | /// <summary> | 82 | /// <summary> |
83 | /// Send a dialog box to a particular user. | ||
84 | /// </summary> | ||
85 | /// <param name="avatarID"></param> | ||
86 | /// <param name="objectName"></param> | ||
87 | /// <param name="objectID"></param> | ||
88 | /// <param name="ownerID"></param> | ||
89 | /// <param name="message"></param> | ||
90 | /// <param name="textureID"></param> | ||
91 | /// <param name="ch"></param> | ||
92 | /// <param name="buttonlabels"></param> | ||
93 | void SendDialogToUser( | ||
94 | UUID avatarID, string objectName, UUID objectID, UUID ownerID, | ||
95 | string message, UUID textureID, int ch, string[] buttonlabels); | ||
96 | |||
97 | /// <summary> | ||
83 | /// Send a notification to all users in the scene. This notification should remain around until the | 98 | /// Send a notification to all users in the scene. This notification should remain around until the |
84 | /// user explicitly dismisses it. | 99 | /// user explicitly dismisses it. |
85 | /// </summary> | 100 | /// </summary> |
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 | |||
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | public void SendDialogToUser( | ||
105 | UUID avatarID, string objectName, UUID objectID, UUID ownerID, | ||
106 | string message, UUID textureID, int ch, string[] buttonlabels) | ||
107 | { | ||
108 | ScenePresence sp = m_scene.GetScenePresence(avatarID); | ||
109 | |||
110 | if (sp != null) | ||
111 | sp.ControllingClient.SendDialog(objectName, objectID, ownerID, message, textureID, ch, buttonlabels); | ||
112 | } | ||
113 | |||
104 | public void SendNotificationToUsersInEstate( | 114 | public void SendNotificationToUsersInEstate( |
105 | UUID fromAvatarID, string fromAvatarName, string message) | 115 | UUID fromAvatarID, string fromAvatarName, string message) |
106 | { | 116 | { |
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 | |||
3377 | } | 3377 | } |
3378 | } | 3378 | } |
3379 | 3379 | ||
3380 | public void SendDialogToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string message, UUID TextureID, int ch, string[] buttonlabels) | ||
3381 | { | ||
3382 | lock (m_scenePresences) | ||
3383 | { | ||
3384 | if (m_scenePresences.ContainsKey(avatarID)) | ||
3385 | { | ||
3386 | m_scenePresences[avatarID].ControllingClient.SendDialog( | ||
3387 | objectName, objectID, ownerID, message, TextureID, ch, buttonlabels); | ||
3388 | } | ||
3389 | } | ||
3390 | } | ||
3391 | |||
3392 | public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms) | 3380 | public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms) |
3393 | { | 3381 | { |
3394 | m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms); | 3382 | 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 1afa08d..f2a8474 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 | |||
5722 | 5722 | ||
5723 | public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel) | 5723 | public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel) |
5724 | { | 5724 | { |
5725 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); | ||
5726 | |||
5727 | if (dm == null) | ||
5728 | return; | ||
5729 | |||
5725 | m_host.AddScriptLPS(1); | 5730 | m_host.AddScriptLPS(1); |
5726 | UUID av = new UUID(); | 5731 | UUID av = new UUID(); |
5727 | if (!UUID.TryParse(avatar,out av)) | 5732 | if (!UUID.TryParse(avatar,out av)) |
@@ -5749,7 +5754,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5749 | } | 5754 | } |
5750 | buts[i] = buttons.Data[i].ToString(); | 5755 | buts[i] = buttons.Data[i].ToString(); |
5751 | } | 5756 | } |
5752 | World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); | 5757 | |
5758 | dm.SendDialogToUser( | ||
5759 | av, m_host.Name, m_host.UUID, m_host.OwnerID, | ||
5760 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); | ||
5761 | |||
5753 | // ScriptSleep(1000); | 5762 | // ScriptSleep(1000); |
5754 | } | 5763 | } |
5755 | 5764 | ||