diff options
Diffstat (limited to '')
13 files changed, 109 insertions, 6 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index cf87a30..7b435f5 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1710,5 +1710,9 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1710 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | 1710 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) |
1711 | { | 1711 | { |
1712 | } | 1712 | } |
1713 | |||
1714 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1715 | { | ||
1716 | } | ||
1713 | } | 1717 | } |
1714 | } | 1718 | } |
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index 56f5f8f..e2986d9 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs | |||
@@ -1199,6 +1199,10 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
1199 | { | 1199 | { |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1203 | { | ||
1204 | } | ||
1205 | |||
1202 | #endregion | 1206 | #endregion |
1203 | } | 1207 | } |
1204 | } | 1208 | } |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index b8f46dc..c4f2016 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -1214,5 +1214,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
1214 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | 1214 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) |
1215 | { | 1215 | { |
1216 | } | 1216 | } |
1217 | |||
1218 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1219 | { | ||
1220 | } | ||
1217 | } | 1221 | } |
1218 | } | 1222 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 82b5968..0c268bf 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1479,5 +1479,6 @@ namespace OpenSim.Framework | |||
1479 | void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); | 1479 | void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); |
1480 | 1480 | ||
1481 | void SendChangeUserRights(UUID agentID, UUID friendID, int rights); | 1481 | void SendChangeUserRights(UUID agentID, UUID friendID, int rights); |
1482 | void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId); | ||
1482 | } | 1483 | } |
1483 | } | 1484 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 569dc8d..2e59457 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -11630,5 +11630,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11630 | 11630 | ||
11631 | OutPacket(packet, ThrottleOutPacketType.Task); | 11631 | OutPacket(packet, ThrottleOutPacketType.Task); |
11632 | } | 11632 | } |
11633 | |||
11634 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
11635 | { | ||
11636 | ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); | ||
11637 | dialog.Data.ObjectID = objectId; | ||
11638 | dialog.Data.ChatChannel = chatChannel; | ||
11639 | dialog.Data.ImageID = UUID.Zero; | ||
11640 | dialog.Data.ObjectName = Util.StringToBytes256(objectname); | ||
11641 | // this is the username of the *owner* | ||
11642 | dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); | ||
11643 | dialog.Data.LastName = Util.StringToBytes256(ownerLastName); | ||
11644 | dialog.Data.Message = Util.StringToBytes256(message); | ||
11645 | |||
11646 | |||
11647 | ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; | ||
11648 | buttons[0] = new ScriptDialogPacket.ButtonsBlock(); | ||
11649 | buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); | ||
11650 | dialog.Buttons = buttons; | ||
11651 | OutPacket(dialog, ThrottleOutPacketType.Task); | ||
11652 | } | ||
11633 | } | 11653 | } |
11634 | } | 11654 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index fac052a..b8e013c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | using log4net; | 31 | using log4net; |
@@ -151,7 +152,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
151 | // region as the sending avatar. | 152 | // region as the sending avatar. |
152 | SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message); | 153 | SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message); |
153 | } | 154 | } |
154 | 155 | ||
156 | public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid) | ||
157 | { | ||
158 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid); | ||
159 | string ownerFirstName, ownerLastName; | ||
160 | if (account != null) | ||
161 | { | ||
162 | ownerFirstName = account.FirstName; | ||
163 | ownerLastName = account.LastName; | ||
164 | } | ||
165 | else | ||
166 | { | ||
167 | ownerFirstName = "(unknown"; | ||
168 | ownerLastName = "user)"; | ||
169 | } | ||
170 | |||
171 | |||
172 | ScenePresence sp = m_scene.GetScenePresence(avatarid); | ||
173 | |||
174 | if (sp != null) { | ||
175 | sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid); | ||
176 | } | ||
177 | } | ||
178 | |||
155 | public void SendNotificationToUsersInRegion( | 179 | public void SendNotificationToUsersInRegion( |
156 | UUID fromAvatarID, string fromAvatarName, string message) | 180 | UUID fromAvatarID, string fromAvatarName, string message) |
157 | { | 181 | { |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index a1957d1..7fdddc3 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -1153,5 +1153,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
1153 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | 1153 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) |
1154 | { | 1154 | { |
1155 | } | 1155 | } |
1156 | |||
1157 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1158 | { | ||
1159 | } | ||
1156 | } | 1160 | } |
1157 | } | 1161 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs index ce57c44..35b4b63 100644 --- a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs | |||
@@ -131,5 +131,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
131 | /// <param name="fromAvatarName">The name of the user doing the sending</param> | 131 | /// <param name="fromAvatarName">The name of the user doing the sending</param> |
132 | /// <param name="message">The message being sent to the user</param> | 132 | /// <param name="message">The message being sent to the user</param> |
133 | void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message); | 133 | void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message); |
134 | |||
135 | /// <summary> | ||
136 | /// Send a textbox entry for the client to respond to | ||
137 | /// </summary> | ||
138 | void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid); | ||
134 | } | 139 | } |
135 | } | 140 | } |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 96530a1..f2253f2 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1679,5 +1679,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1679 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | 1679 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) |
1680 | { | 1680 | { |
1681 | } | 1681 | } |
1682 | |||
1683 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1684 | { | ||
1685 | } | ||
1682 | } | 1686 | } |
1683 | } | 1687 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index f8ab8d8..65445d9 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -1159,5 +1159,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1159 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | 1159 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) |
1160 | { | 1160 | { |
1161 | } | 1161 | } |
1162 | |||
1163 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1164 | { | ||
1165 | } | ||
1162 | } | 1166 | } |
1163 | } | 1167 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0a871d9..59db81e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4009,10 +4009,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4009 | ScriptSleep(5000); | 4009 | ScriptSleep(5000); |
4010 | } | 4010 | } |
4011 | 4011 | ||
4012 | public void llTextBox(string avatar, string message, int chat_channel) | 4012 | public void llTextBox(string agent, string message, int chatChannel) |
4013 | { | 4013 | { |
4014 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); | ||
4015 | |||
4016 | if (dm == null) | ||
4017 | return; | ||
4018 | |||
4014 | m_host.AddScriptLPS(1); | 4019 | m_host.AddScriptLPS(1); |
4015 | NotImplemented("llTextBox"); | 4020 | UUID av = new UUID(); |
4021 | if (!UUID.TryParse(agent,out av)) | ||
4022 | { | ||
4023 | LSLError("First parameter to llDialog needs to be a key"); | ||
4024 | return; | ||
4025 | } | ||
4026 | |||
4027 | if( message == string.Empty) | ||
4028 | { | ||
4029 | ShoutError("Trying to use llTextBox with empty message."); | ||
4030 | } | ||
4031 | else if (message.Length > 512) | ||
4032 | { | ||
4033 | ShoutError("Trying to use llTextBox with message over 512 characters."); | ||
4034 | } | ||
4035 | else | ||
4036 | { | ||
4037 | dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); | ||
4038 | ScriptSleep(1000); | ||
4039 | } | ||
4016 | } | 4040 | } |
4017 | 4041 | ||
4018 | public void llModifyLand(int action, int brush) | 4042 | public void llModifyLand(int action, int brush) |
@@ -4027,6 +4051,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4027 | 4051 | ||
4028 | public void llCollisionSound(string impact_sound, double impact_volume) | 4052 | public void llCollisionSound(string impact_sound, double impact_volume) |
4029 | { | 4053 | { |
4054 | |||
4030 | m_host.AddScriptLPS(1); | 4055 | m_host.AddScriptLPS(1); |
4031 | // TODO: Parameter check logic required. | 4056 | // TODO: Parameter check logic required. |
4032 | UUID soundId = UUID.Zero; | 4057 | UUID soundId = UUID.Zero; |
@@ -5875,7 +5900,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5875 | 5900 | ||
5876 | for (int i = 0; i < rules.Length; i += 2) | 5901 | for (int i = 0; i < rules.Length; i += 2) |
5877 | { | 5902 | { |
5878 | switch (Convert.ToInt32(rules.Data[i])) | 5903 | switch (rules.GetLSLIntegerItem(i)) |
5879 | { | 5904 | { |
5880 | case (int)ScriptBaseClass.PSYS_PART_FLAGS: | 5905 | case (int)ScriptBaseClass.PSYS_PART_FLAGS: |
5881 | prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); | 5906 | prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); |
@@ -9846,4 +9871,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9846 | } | 9871 | } |
9847 | } | 9872 | } |
9848 | } | 9873 | } |
9849 | } \ No newline at end of file | 9874 | } |
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs index e1621b8..8e7c92b 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs | |||
@@ -131,7 +131,7 @@ namespace OpenSim.Services.Connectors | |||
131 | //sendData["SCOPEID"] = scopeID.ToString(); | 131 | //sendData["SCOPEID"] = scopeID.ToString(); |
132 | sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); | 132 | sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); |
133 | sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); | 133 | sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); |
134 | sendData["METHOD"] = "getagents"; | 134 | sendData["METHOD"] = "getaccounts"; |
135 | 135 | ||
136 | sendData["ScopeID"] = scopeID.ToString(); | 136 | sendData["ScopeID"] = scopeID.ToString(); |
137 | sendData["query"] = query; | 137 | sendData["query"] = query; |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 6403c1b..7b46e95 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -1213,5 +1213,9 @@ namespace OpenSim.Tests.Common.Mock | |||
1213 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | 1213 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) |
1214 | { | 1214 | { |
1215 | } | 1215 | } |
1216 | |||
1217 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1218 | { | ||
1219 | } | ||
1216 | } | 1220 | } |
1217 | } | 1221 | } |