Send the owner name, not the client name on SendDialog.
This modifies IClientAPI.SendDialog slightly. Fixes Mantis #3661.0.6.6-post-fixes
parent
29301e66c0
commit
99cf8e3f5a
|
@ -1146,7 +1146,7 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
|
SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
|
public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
|
||||||
{
|
{
|
||||||
// TODO: Probably can do this better
|
// TODO: Probably can do this better
|
||||||
SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
|
SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
|
||||||
|
|
|
@ -694,7 +694,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
|
public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -957,7 +957,7 @@ namespace OpenSim.Framework
|
||||||
void SendAgentAlertMessage(string message, bool modal);
|
void SendAgentAlertMessage(string message, bool modal);
|
||||||
void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
|
void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
|
||||||
|
|
||||||
void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch,
|
void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
|
||||||
string[] buttonlabels);
|
string[] buttonlabels);
|
||||||
|
|
||||||
bool AddMoney(int debit);
|
bool AddMoney(int debit);
|
||||||
|
|
|
@ -2474,13 +2474,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(loadURL, ThrottleOutPacketType.Task);
|
OutPacket(loadURL, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
|
public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
|
||||||
{
|
{
|
||||||
ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
|
ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
|
||||||
dialog.Data.ObjectID = objectID;
|
dialog.Data.ObjectID = objectID;
|
||||||
dialog.Data.ObjectName = Utils.StringToBytes(objectname);
|
dialog.Data.ObjectName = Utils.StringToBytes(objectname);
|
||||||
dialog.Data.FirstName = Utils.StringToBytes(FirstName);
|
// this is the username of the *owner*
|
||||||
dialog.Data.LastName = Utils.StringToBytes(LastName);
|
dialog.Data.FirstName = Utils.StringToBytes(ownerFirstName);
|
||||||
|
dialog.Data.LastName = Utils.StringToBytes(ownerLastName);
|
||||||
dialog.Data.Message = Utils.StringToBytes(msg);
|
dialog.Data.Message = Utils.StringToBytes(msg);
|
||||||
dialog.Data.ImageID = textureID;
|
dialog.Data.ImageID = textureID;
|
||||||
dialog.Data.ChatChannel = ch;
|
dialog.Data.ChatChannel = ch;
|
||||||
|
|
|
@ -31,6 +31,7 @@ using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
|
@ -111,10 +112,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
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)
|
||||||
{
|
{
|
||||||
ScenePresence sp = m_scene.GetScenePresence(avatarID);
|
CachedUserInfo info = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(ownerID);
|
||||||
|
string ownerFirstName, ownerLastName;
|
||||||
|
if (info != null)
|
||||||
|
{
|
||||||
|
ownerFirstName = info.UserProfile.FirstName;
|
||||||
|
ownerLastName = info.UserProfile.SurName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ownerFirstName = "(unknown";
|
||||||
|
ownerLastName = "user)";
|
||||||
|
}
|
||||||
|
|
||||||
|
ScenePresence sp = m_scene.GetScenePresence(avatarID);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
sp.ControllingClient.SendDialog(objectName, objectID, ownerID, message, textureID, ch, buttonlabels);
|
sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendUrlToUser(
|
public void SendUrlToUser(
|
||||||
|
|
|
@ -515,7 +515,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
|
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -604,7 +604,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
|
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -602,7 +602,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
|
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue