aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs4
4 files changed, 17 insertions, 7 deletions
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
161 string message = e.Message; 161 string message = e.Message;
162 LLUUID fromID = e.SenderUUID; 162 LLUUID fromID = e.SenderUUID;
163 163
164 if(message.Length >= 1000) // libomv limit
165 message = message.Substring(0, 1000);
166
164 if (e.Sender != null) 167 if (e.Sender != null)
165 { 168 {
166 avatar = scene.GetScenePresence(e.Sender.AgentId); 169 avatar = scene.GetScenePresence(e.Sender.AgentId);
@@ -240,4 +243,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
240 fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully); 243 fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully);
241 } 244 }
242 } 245 }
243} \ No newline at end of file 246}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 8ce1413..6b674f3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -517,9 +517,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
517 try 517 try
518 { 518 {
519 // DISPLAY ERROR INWORLD 519 // DISPLAY ERROR INWORLD
520 string text = "Runtime error:\n" + e.ToString(); 520 string text = "Runtime error:\n" + e.InnerException.ToString();
521 if (text.Length > 1400) 521 if (text.Length > 1000)
522 text = text.Substring(0, 1400); 522 text = text.Substring(0, 1000);
523 m_Engine.World.SimChat(Helpers.StringToField(text), 523 m_Engine.World.SimChat(Helpers.StringToField(text),
524 ChatTypeEnum.DebugChannel, 2147483647, 524 ChatTypeEnum.DebugChannel, 2147483647,
525 part.AbsolutePosition, 525 part.AbsolutePosition,
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index babb759..23177e5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1394,8 +1394,15 @@ namespace OpenSim.Region.ScriptEngine.Shared
1394 1394
1395 static public explicit operator LSLInteger(string s) 1395 static public explicit operator LSLInteger(string s)
1396 { 1396 {
1397 Regex r = new Regex("^[0-9][0-9]*");
1398 Match m = r.Match(s);
1399 string v = m.Groups[0].Value;
1400
1401 if (v == String.Empty)
1402 v = "0";
1403
1397 // double.Parse() used because s could be "123.9" for example. 1404 // double.Parse() used because s could be "123.9" for example.
1398 return new LSLInteger(double.Parse(s)); 1405 return new LSLInteger(int.Parse(v));
1399 } 1406 }
1400 1407
1401 static public implicit operator LSLInteger(uint u) 1408 static public implicit operator LSLInteger(uint u)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index a33554c..f9f8883 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -432,8 +432,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
432 { 432 {
433 // DISPLAY ERROR INWORLD 433 // DISPLAY ERROR INWORLD
434 string text = "Error compiling script:\r\n" + e.Message.ToString(); 434 string text = "Error compiling script:\r\n" + e.Message.ToString();
435 if (text.Length > 1400) 435 if (text.Length > 1000)
436 text = text.Substring(0, 1400); 436 text = text.Substring(0, 1000);
437 World.SimChat(Helpers.StringToField(text), 437 World.SimChat(Helpers.StringToField(text),
438 ChatTypeEnum.DebugChannel, 2147483647, 438 ChatTypeEnum.DebugChannel, 2147483647,
439 part.AbsolutePosition, 439 part.AbsolutePosition,