From af49acd6cca7fe3609f2febabb9fcde37af412bf Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 8 Jan 2009 19:28:10 +0000 Subject: * refactor: move url sending from scene to DialogModule --- .../Region/Environment/Interfaces/IDialogModule.cs | 15 +++++++++++++- .../Modules/Avatar/Dialog/DialogModule.cs | 9 +++++++++ OpenSim/Region/Environment/Scenes/Scene.cs | 23 ---------------------- 3 files changed, 23 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs index 45c62bd..755aa27 100644 --- a/OpenSim/Region/Environment/Interfaces/IDialogModule.cs +++ b/OpenSim/Region/Environment/Interfaces/IDialogModule.cs @@ -92,7 +92,20 @@ namespace OpenSim.Region.Environment.Interfaces /// void SendDialogToUser( UUID avatarID, string objectName, UUID objectID, UUID ownerID, - string message, UUID textureID, int ch, string[] buttonlabels); + string message, UUID textureID, int ch, string[] buttonlabels); + + /// + /// Send a url to a particular user. + /// + /// + /// + /// + /// + /// + /// + /// + void SendUrlToUser( + UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); /// /// Send a notification to all users in the scene. This notification should remain around until the diff --git a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs index 8fbe77f..4f8da9a 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Dialog/DialogModule.cs @@ -110,6 +110,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog if (sp != null) sp.ControllingClient.SendDialog(objectName, objectID, ownerID, message, textureID, ch, buttonlabels); } + + public void SendUrlToUser( + UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) + { + ScenePresence sp = m_scene.GetScenePresence(avatarID); + + if (sp != null) + sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url); + } 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 655f15d..3b4b719 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -3354,29 +3354,6 @@ namespace OpenSim.Region.Environment.Scenes m_timePhase = phase; } - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public void SendUrlToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, - string message, string url) - { - lock (m_scenePresences) - { - if (m_scenePresences.ContainsKey(avatarID)) - { - m_scenePresences[avatarID].ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, - message, url); - } - } - } - public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms) { m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms); -- cgit v1.1