From 61978649ec1642f1c0bf0a3aa6492cebefab85d3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 2 Sep 2008 03:43:18 +0000 Subject: Change some chat output functions so that text is truncated at 1000 chars to avoid the exception thrown by libomv at 1100 chars. Change string->int conversion so it copes with non-numeric chars after the number and no longer uses a float to parse the value. --- OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs index f98633f..1493e32 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs @@ -161,6 +161,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat string message = e.Message; LLUUID fromID = e.SenderUUID; + if(message.Length >= 1000) // libomv limit + message = message.Substring(0, 1000); + if (e.Sender != null) { avatar = scene.GetScenePresence(e.Sender.AgentId); @@ -240,4 +243,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully); } } -} \ No newline at end of file +} -- cgit v1.1