aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs7
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs23
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
4 files changed, 24 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 7c524d9..534136d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2474,13 +2474,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2474 OutPacket(loadURL, ThrottleOutPacketType.Task); 2474 OutPacket(loadURL, ThrottleOutPacketType.Task);
2475 } 2475 }
2476 2476
2477 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) 2477 public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
2478 { 2478 {
2479 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); 2479 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
2480 dialog.Data.ObjectID = objectID; 2480 dialog.Data.ObjectID = objectID;
2481 dialog.Data.ObjectName = Utils.StringToBytes(objectname); 2481 dialog.Data.ObjectName = Utils.StringToBytes(objectname);
2482 dialog.Data.FirstName = Utils.StringToBytes(FirstName); 2482 // this is the username of the *owner*
2483 dialog.Data.LastName = Utils.StringToBytes(LastName); 2483 dialog.Data.FirstName = Utils.StringToBytes(ownerFirstName);
2484 dialog.Data.LastName = Utils.StringToBytes(ownerLastName);
2484 dialog.Data.Message = Utils.StringToBytes(msg); 2485 dialog.Data.Message = Utils.StringToBytes(msg);
2485 dialog.Data.ImageID = textureID; 2486 dialog.Data.ImageID = textureID;
2486 dialog.Data.ChatChannel = ch; 2487 dialog.Data.ChatChannel = ch;
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 6dd020a..90c335c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -31,6 +31,7 @@ using log4net;
31using Nini.Config; 31using Nini.Config;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache;
34using OpenSim.Region.Framework.Interfaces; 35using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 36using OpenSim.Region.Framework.Scenes;
36 37
@@ -106,16 +107,28 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
106 presence.ControllingClient.SendAlertMessage(message); 107 presence.ControllingClient.SendAlertMessage(message);
107 } 108 }
108 } 109 }
109 110
110 public void SendDialogToUser( 111 public void SendDialogToUser(
111 UUID avatarID, string objectName, UUID objectID, UUID ownerID, 112 UUID avatarID, string objectName, UUID objectID, UUID ownerID,
112 string message, UUID textureID, int ch, string[] buttonlabels) 113 string message, UUID textureID, int ch, string[] buttonlabels)
113 { 114 {
115 CachedUserInfo info = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(ownerID);
116 string ownerFirstName, ownerLastName;
117 if (info != null)
118 {
119 ownerFirstName = info.UserProfile.FirstName;
120 ownerLastName = info.UserProfile.SurName;
121 }
122 else
123 {
124 ownerFirstName = "(unknown";
125 ownerLastName = "user)";
126 }
127
114 ScenePresence sp = m_scene.GetScenePresence(avatarID); 128 ScenePresence sp = m_scene.GetScenePresence(avatarID);
115
116 if (sp != null) 129 if (sp != null)
117 sp.ControllingClient.SendDialog(objectName, objectID, ownerID, message, textureID, ch, buttonlabels); 130 sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
118 } 131 }
119 132
120 public void SendUrlToUser( 133 public void SendUrlToUser(
121 UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) 134 UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 3e9195e..1641f2d 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -515,7 +515,7 @@ namespace OpenSim.Region.Examples.SimpleModule
515 { 515 {
516 } 516 }
517 517
518 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) 518 public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
519 { 519 {
520 } 520 }
521 521
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index f529c9e..a5ac17e 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -604,7 +604,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
604 { 604 {
605 } 605 }
606 606
607 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) 607 public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
608 { 608 {
609 } 609 }
610 610