diff options
author | Homer Horwitz | 2009-05-16 16:01:25 +0000 |
---|---|---|
committer | Homer Horwitz | 2009-05-16 16:01:25 +0000 |
commit | 99cf8e3f5ab73c6d25506678d78f847278865630 (patch) | |
tree | f8104a56f2579c385d2f390ad172cc904ca2608e /OpenSim | |
parent | Oops. Next time try not to commit things at the same time as having important... (diff) | |
download | opensim-SC-99cf8e3f5ab73c6d25506678d78f847278865630.zip opensim-SC-99cf8e3f5ab73c6d25506678d78f847278865630.tar.gz opensim-SC-99cf8e3f5ab73c6d25506678d78f847278865630.tar.bz2 opensim-SC-99cf8e3f5ab73c6d25506678d78f847278865630.tar.xz |
Send the owner name, not the client name on SendDialog.
This modifies IClientAPI.SendDialog slightly.
Fixes Mantis #3661.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 2 |
8 files changed, 28 insertions, 14 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 1cbf911..1ae01cc 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1146,7 +1146,7 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1146 | SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); | 1146 | SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) | 1149 | public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) |
1150 | { | 1150 | { |
1151 | // TODO: Probably can do this better | 1151 | // TODO: Probably can do this better |
1152 | SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); | 1152 | SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 4218ad7..011392e 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -694,7 +694,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
694 | throw new System.NotImplementedException(); | 694 | throw new System.NotImplementedException(); |
695 | } | 695 | } |
696 | 696 | ||
697 | public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) | 697 | public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) |
698 | { | 698 | { |
699 | throw new System.NotImplementedException(); | 699 | throw new System.NotImplementedException(); |
700 | } | 700 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 9b137b7..6c42d03 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -957,7 +957,7 @@ namespace OpenSim.Framework | |||
957 | void SendAgentAlertMessage(string message, bool modal); | 957 | void SendAgentAlertMessage(string message, bool modal); |
958 | void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); | 958 | void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); |
959 | 959 | ||
960 | void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, | 960 | void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, |
961 | string[] buttonlabels); | 961 | string[] buttonlabels); |
962 | 962 | ||
963 | bool AddMoney(int debit); | 963 | bool AddMoney(int debit); |
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; | |||
31 | using Nini.Config; | 31 | using Nini.Config; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications.Cache; | ||
34 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Framework.Scenes; | 36 | using 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 | ||
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index f607284..00f7bb1 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -602,7 +602,7 @@ namespace OpenSim.Tests.Common.Mock | |||
602 | { | 602 | { |
603 | } | 603 | } |
604 | 604 | ||
605 | public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) | 605 | public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) |
606 | { | 606 | { |
607 | } | 607 | } |
608 | 608 | ||