diff options
author | Justin Clarke Casey | 2009-01-08 19:14:52 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-08 19:14:52 +0000 |
commit | e7bb27b5bd9ae459096f1c2282a558ee872bc0c5 (patch) | |
tree | 03604341d11fee0f8085f38d7c39795a17e2b245 /OpenSim/Region/Environment | |
parent | * refactor: move estate dialog to DialogModule (diff) | |
download | opensim-SC_OLD-e7bb27b5bd9ae459096f1c2282a558ee872bc0c5.zip opensim-SC_OLD-e7bb27b5bd9ae459096f1c2282a558ee872bc0c5.tar.gz opensim-SC_OLD-e7bb27b5bd9ae459096f1c2282a558ee872bc0c5.tar.bz2 opensim-SC_OLD-e7bb27b5bd9ae459096f1c2282a558ee872bc0c5.tar.xz |
* refactor: move code to send a dialog to a user from scene to DialogModule
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Interfaces/IDialogModule.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 12 |
3 files changed, 25 insertions, 12 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); |