* refactor: move url sending from scene to DialogModule
parent
be41132c72
commit
af49acd6cc
|
@ -92,7 +92,20 @@ namespace OpenSim.Region.Environment.Interfaces
|
||||||
/// <param name="buttonlabels"></param>
|
/// <param name="buttonlabels"></param>
|
||||||
void SendDialogToUser(
|
void SendDialogToUser(
|
||||||
UUID avatarID, string objectName, UUID objectID, UUID ownerID,
|
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>
|
/// <summary>
|
||||||
/// Send a notification to all users in the scene. This notification should remain around until the
|
/// Send a notification to all users in the scene. This notification should remain around until the
|
||||||
|
|
|
@ -110,6 +110,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Dialog
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
sp.ControllingClient.SendDialog(objectName, objectID, ownerID, message, textureID, ch, buttonlabels);
|
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(
|
public void SendNotificationToUsersInEstate(
|
||||||
UUID fromAvatarID, string fromAvatarName, string message)
|
UUID fromAvatarID, string fromAvatarName, string message)
|
||||||
|
|
|
@ -3354,29 +3354,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_timePhase = phase;
|
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)
|
public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms)
|
||||||
{
|
{
|
||||||
m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms);
|
m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms);
|
||||||
|
|
|
@ -7799,9 +7799,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void llLoadURL(string avatar_id, string message, string url)
|
public void llLoadURL(string avatar_id, string message, string url)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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,
|
IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
|
||||||
url);
|
if (null != dm)
|
||||||
|
dm.SendUrlToUser(
|
||||||
|
new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url);
|
||||||
|
|
||||||
// ScriptSleep(10000);
|
// ScriptSleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue