mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
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
This commit is contained in:
@@ -2717,7 +2717,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//{
|
||||
// msg.fromAgentName = "(hippos)";// Added for posterity. This means that we can't figure out who sent it
|
||||
//}
|
||||
msg.message = message;
|
||||
// Cap the message length at 1024.
|
||||
if (message != null && message.Length > 1024)
|
||||
msg.message = message.Substring(0, 1024);
|
||||
else
|
||||
msg.message = message;
|
||||
msg.dialog = (byte)19; // messgage from script ??? // dialog;
|
||||
msg.fromGroup = false;// fromGroup;
|
||||
msg.offline = (byte)0; //offline;
|
||||
|
||||
Reference in New Issue
Block a user