aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJeff Ames2008-05-30 08:35:57 +0000
committerJeff Ames2008-05-30 08:35:57 +0000
commit04625109560fb54d613b1fc9c81a8a9f387720c9 (patch)
treeaf00035a676beee3542a55cd13ce09e57f1ad778 /OpenSim/Region/ScriptEngine
parentthanks krtaylor for a (diff)
downloadopensim-SC-04625109560fb54d613b1fc9c81a8a9f387720c9.zip
opensim-SC-04625109560fb54d613b1fc9c81a8a9f387720c9.tar.gz
opensim-SC-04625109560fb54d613b1fc9c81a8a9f387720c9.tar.bz2
opensim-SC-04625109560fb54d613b1fc9c81a8a9f387720c9.tar.xz
Update svn properties. Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs8
4 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 33aa905..518e37b 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -1432,7 +1432,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1432 m_host.Sound = key; 1432 m_host.Sound = key;
1433 } 1433 }
1434 // else try to locate the name in inventory of object. found returns key, 1434 // else try to locate the name in inventory of object. found returns key,
1435 // not found returns LLUUID.Zero 1435 // not found returns LLUUID.Zero
1436 else 1436 else
1437 { 1437 {
1438 m_host.Sound = InventoryKey(sound.ToString()); 1438 m_host.Sound = InventoryKey(sound.ToString());
@@ -1477,7 +1477,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1477 m_host.Sound = LLUUID.Zero; 1477 m_host.Sound = LLUUID.Zero;
1478 m_host.SoundGain = 0; 1478 m_host.SoundGain = 0;
1479 m_host.SoundFlags = 0; 1479 m_host.SoundFlags = 0;
1480 m_host.SoundRadius = 0; 1480 m_host.SoundRadius = 0;
1481 1481
1482 m_host.SendFullUpdateToAllClients(); 1482 m_host.SendFullUpdateToAllClients();
1483 1483
@@ -3871,7 +3871,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3871 { 3871 {
3872 // Finally got to the first line of the notecard 3872 // Finally got to the first line of the notecard
3873 // now find the end of the notecard text delimited by }<LF> 3873 // now find the end of the notecard text delimited by }<LF>
3874 // parse the lines, delimited by <LF> 3874 // parse the lines, delimited by <LF>
3875 notecardIndex = dataString.IndexOf("\n", notecardIndex); 3875 notecardIndex = dataString.IndexOf("\n", notecardIndex);
3876 notecardIndex++; // get past delimiter 3876 notecardIndex++; // get past delimiter
3877 3877
@@ -5627,10 +5627,10 @@ namespace OpenSim.Region.ScriptEngine.Common
5627 5627
5628 RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator); 5628 RegionInfo info = m_ScriptEngine.World.RequestClosestRegion(simulator);
5629 5629
5630 switch(data) 5630 switch (data)
5631 { 5631 {
5632 case 5: // DATA_SIM_POS 5632 case 5: // DATA_SIM_POS
5633 if(info == null) 5633 if (info == null)
5634 return LLUUID.Zero.ToString(); 5634 return LLUUID.Zero.ToString();
5635 reply = new LSL_Types.Vector3( 5635 reply = new LSL_Types.Vector3(
5636 info.RegionLocX * Constants.RegionSize, 5636 info.RegionLocX * Constants.RegionSize,
@@ -5638,18 +5638,18 @@ namespace OpenSim.Region.ScriptEngine.Common
5638 0).ToString(); 5638 0).ToString();
5639 break; 5639 break;
5640 case 6: // DATA_SIM_STATUS 5640 case 6: // DATA_SIM_STATUS
5641 if(info != null) 5641 if (info != null)
5642 reply = "up"; // Duh! 5642 reply = "up"; // Duh!
5643 else 5643 else
5644 reply = "unknown"; 5644 reply = "unknown";
5645 break; 5645 break;
5646 case 7: // DATA_SIM_RATING 5646 case 7: // DATA_SIM_RATING
5647 if(info == null) 5647 if (info == null)
5648 return LLUUID.Zero.ToString(); 5648 return LLUUID.Zero.ToString();
5649 int access = (int)info.EstateSettings.simAccess; 5649 int access = (int)info.EstateSettings.simAccess;
5650 if(access == 21) 5650 if (access == 21)
5651 reply = "MATURE"; 5651 reply = "MATURE";
5652 else if(access == 13) 5652 else if (access == 13)
5653 reply = "MATURE"; 5653 reply = "MATURE";
5654 else 5654 else
5655 reply = "UNKNOWN"; 5655 reply = "UNKNOWN";
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
index eb87a9c..5f86c9c 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
@@ -59,9 +59,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
59 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 59 public LLUUID RegisterRequest(uint localID, LLUUID itemID,
60 string identifier) 60 string identifier)
61 { 61 {
62 lock(DataserverRequests) 62 lock (DataserverRequests)
63 { 63 {
64 if(DataserverRequests.ContainsKey(identifier)) 64 if (DataserverRequests.ContainsKey(identifier))
65 return LLUUID.Zero; 65 return LLUUID.Zero;
66 66
67 DataserverRequest ds = new DataserverRequest(); 67 DataserverRequest ds = new DataserverRequest();
@@ -84,9 +84,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
84 { 84 {
85 DataserverRequest ds; 85 DataserverRequest ds;
86 86
87 lock(DataserverRequests) 87 lock (DataserverRequests)
88 { 88 {
89 if(!DataserverRequests.ContainsKey(identifier)) 89 if (!DataserverRequests.ContainsKey(identifier))
90 return; 90 return;
91 91
92 ds=DataserverRequests[identifier]; 92 ds=DataserverRequests[identifier];
@@ -101,11 +101,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
101 101
102 public void RemoveEvents(uint localID, LLUUID itemID) 102 public void RemoveEvents(uint localID, LLUUID itemID)
103 { 103 {
104 lock(DataserverRequests) 104 lock (DataserverRequests)
105 { 105 {
106 foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) 106 foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values))
107 { 107 {
108 if(ds.itemID == itemID) 108 if (ds.itemID == itemID)
109 DataserverRequests.Remove(ds.handle); 109 DataserverRequests.Remove(ds.handle);
110 } 110 }
111 } 111 }
@@ -113,11 +113,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
113 113
114 public void ExpireRequests() 114 public void ExpireRequests()
115 { 115 {
116 lock(DataserverRequests) 116 lock (DataserverRequests)
117 { 117 {
118 foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) 118 foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values))
119 { 119 {
120 if(ds.startTime > DateTime.Now.AddSeconds(30)) 120 if (ds.startTime > DateTime.Now.AddSeconds(30))
121 DataserverRequests.Remove(ds.handle); 121 DataserverRequests.Remove(ds.handle);
122 } 122 }
123 } 123 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
index c793add..ba6a98c 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
57 bool handled = false; 57 bool handled = false;
58 58
59 // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely 59 // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely
60 xmlrpc.RemoveCompletedRequest(rInfo.GetMessageID()); 60 xmlrpc.RemoveCompletedRequest(rInfo.GetMessageID());
61 61
62 // And since the xmlrpc request queue is actually shared among all regions on the simulator, we need 62 // And since the xmlrpc request queue is actually shared among all regions on the simulator, we need
63 // to look in each one for the appropriate handler 63 // to look in each one for the appropriate handler
@@ -96,9 +96,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
96 96
97 // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely 97 // Request must be taken out of the queue in case there is no handler, otherwise we loop infinitely
98 xmlrpc.RemoveCompletedSRDRequest(srdInfo.GetReqID()); 98 xmlrpc.RemoveCompletedSRDRequest(srdInfo.GetReqID());
99 99
100 // And this is another shared queue... so we check each of the script engines for a handler 100 // And this is another shared queue... so we check each of the script engines for a handler
101 foreach (ScriptEngine sman in ScriptEngine.ScriptEngines) 101 foreach (ScriptEngine sman in ScriptEngine.ScriptEngines)
102 { 102 {
103 if (sman.m_ScriptManager.GetScript(srdInfo.m_localID,srdInfo.m_itemID) != null) { 103 if (sman.m_ScriptManager.GetScript(srdInfo.m_localID,srdInfo.m_itemID) != null) {
104 104
@@ -116,7 +116,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
116 handled = true; 116 handled = true;
117 } 117 }
118 } 118 }
119 119
120 if (! handled) 120 if (! handled)
121 { 121 {
122 Console.WriteLine("Unhandled xml_srdrequest: " + srdInfo.GetReqID()); 122 Console.WriteLine("Unhandled xml_srdrequest: " + srdInfo.GetReqID());
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 10380f2..583bb93 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -87,9 +87,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
87 string quote = String.Empty; 87 string quote = String.Empty;
88 bool last_was_escape = false; 88 bool last_was_escape = false;
89 int quote_replaced_count = 0; 89 int quote_replaced_count = 0;
90 90
91 string removefwnoncomments = nonCommentFwsl.Replace(Script, "\"\";"); 91 string removefwnoncomments = nonCommentFwsl.Replace(Script, "\"\";");
92 92
93 string removecomments = conelinecomments.Replace(removefwnoncomments, ""); 93 string removecomments = conelinecomments.Replace(removefwnoncomments, "");
94 removecomments = cstylecomments.Replace(removecomments, ""); 94 removecomments = cstylecomments.Replace(removecomments, "");
95 string[] localscript = removecomments.Split('"'); 95 string[] localscript = removecomments.Split('"');
@@ -121,9 +121,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
121 // ignores alpha.x alpha.y, alpha.z for refering to vector components 121 // ignores alpha.x alpha.y, alpha.z for refering to vector components
122 Match SecurityM; 122 Match SecurityM;
123 123
124 124
125 SecurityM = Regex.Match(checkscript, @"([a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 125 SecurityM = Regex.Match(checkscript, @"([a-zA-Z])\.(?:[a-wA-Z]|[a-zA-Z][a-zA-Z])", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
126 if (SecurityM.Success) 126 if (SecurityM.Success)
127 throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'. Detected around: " + SecurityM.Captures[0].Value); 127 throw new Exception("CS0103: 'The . symbol cannot be used in LSL except in float values or vector components'. Detected around: " + SecurityM.Captures[0].Value);
128 128
129 SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 129 SecurityM = Regex.Match(checkscript, @"typeof\s", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);