* refactor: move url sending from scene to DialogModule

0.6.2-post-fixes
Justin Clarke Casey 2009-01-08 19:28:10 +00:00
parent be41132c72
commit af49acd6cc
4 changed files with 29 additions and 27 deletions

View File

@ -92,7 +92,20 @@ namespace OpenSim.Region.Environment.Interfaces
/// <param name="buttonlabels"></param>
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);
/// <summary>
/// Send a url to a particular user.
/// </summary>
/// <param name="avatarID"></param>
/// <param name="objectName"></param>
/// <param name="objectID"></param>
/// <param name="ownerID"></param>
/// <param name="groupOwned"></param>
/// <param name="message"></param>
/// <param name="url"></param>
void SendUrlToUser(
UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
/// <summary>
/// Send a notification to all users in the scene. This notification should remain around until the

View File

@ -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)

View File

@ -3354,29 +3354,6 @@ namespace OpenSim.Region.Environment.Scenes
m_timePhase = phase;
}
/// <summary>
///
/// </summary>
/// <param name="avatarID"></param>
/// <param name="objectName"></param>
/// <param name="objectID"></param>
/// <param name="ownerID"></param>
/// <param name="groupOwned"></param>
/// <param name="message"></param>
/// <param name="url"></param>
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);

View File

@ -7799,9 +7799,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llLoadURL(string avatar_id, string message, string url)
{
m_host.AddScriptLPS(1);
UUID avatarId = new UUID(avatar_id);
m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message,
url);
IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
if (null != dm)
dm.SendUrlToUser(
new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url);
// ScriptSleep(10000);
}