aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authoridb2009-03-07 14:16:26 +0000
committeridb2009-03-07 14:16:26 +0000
commitaab1601642ef6c1b028fc3160e809732ab4d1769 (patch)
tree7a2321222bc2279dcc689967b22c16b70cb8eef5 /OpenSim/Region/ScriptEngine/Shared
parentAdded the ability to set User-Agent in llHTTPRequest. No new default value ha... (diff)
downloadopensim-SC-aab1601642ef6c1b028fc3160e809732ab4d1769.zip
opensim-SC-aab1601642ef6c1b028fc3160e809732ab4d1769.tar.gz
opensim-SC-aab1601642ef6c1b028fc3160e809732ab4d1769.tar.bz2
opensim-SC-aab1601642ef6c1b028fc3160e809732ab4d1769.tar.xz
Limit the message length from llInstantMessage to 1024 characters http://wiki.secondlife.com/wiki/LlInstantMessage
Also truncate messages that may exceed the limit set by the packet size. The limit in OpenMetaverse is 1100 bytes including a zero byte terminator. Fixes Mantis #3244
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6bb0fe9..69d9c38 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2717,7 +2717,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2717 //{ 2717 //{
2718 // msg.fromAgentName = "(hippos)";// Added for posterity. This means that we can't figure out who sent it 2718 // msg.fromAgentName = "(hippos)";// Added for posterity. This means that we can't figure out who sent it
2719 //} 2719 //}
2720 msg.message = message; 2720 // Cap the message length at 1024.
2721 if (message != null && message.Length > 1024)
2722 msg.message = message.Substring(0, 1024);
2723 else
2724 msg.message = message;
2721 msg.dialog = (byte)19; // messgage from script ??? // dialog; 2725 msg.dialog = (byte)19; // messgage from script ??? // dialog;
2722 msg.fromGroup = false;// fromGroup; 2726 msg.fromGroup = false;// fromGroup;
2723 msg.offline = (byte)0; //offline; 2727 msg.offline = (byte)0; //offline;