aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authoronefang2019-05-19 22:39:27 +1000
committeronefang2019-05-19 22:39:27 +1000
commit7874a0b578acd49ecb981e1f1bdcbd33a67d16c6 (patch)
tree5723b47b5cfada5a7d6fb1e4e8bfd6f283dc9c22 /OpenSim/Region
parentBetter sim startup console notification. (diff)
downloadopensim-SC_OLD-7874a0b578acd49ecb981e1f1bdcbd33a67d16c6.zip
opensim-SC_OLD-7874a0b578acd49ecb981e1f1bdcbd33a67d16c6.tar.gz
opensim-SC_OLD-7874a0b578acd49ecb981e1f1bdcbd33a67d16c6.tar.bz2
opensim-SC_OLD-7874a0b578acd49ecb981e1f1bdcbd33a67d16c6.tar.xz
Less Oh Silly Threat detection.
Scripts run a little faster if they don't stop to be overly paranoid all the time.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs238
1 files changed, 24 insertions, 214 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 6e28fe0..5c03191 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -516,13 +516,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
516 516
517 public LSL_Float osGetTerrainHeight(int x, int y) 517 public LSL_Float osGetTerrainHeight(int x, int y)
518 { 518 {
519 CheckThreatLevel();
520 return GetTerrainHeight(x, y); 519 return GetTerrainHeight(x, y);
521 } 520 }
522 521
523 public LSL_Float osTerrainGetHeight(int x, int y) 522 public LSL_Float osTerrainGetHeight(int x, int y)
524 { 523 {
525 CheckThreatLevel();
526 OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight"); 524 OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight");
527 return GetTerrainHeight(x, y); 525 return GetTerrainHeight(x, y);
528 } 526 }
@@ -659,11 +657,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
659 public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, 657 public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
660 int timer) 658 int timer)
661 { 659 {
662 // This may be upgraded depending on the griefing or DOS
663 // potential, or guarded with a delay
664 //
665 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURL");
666
667 if (dynamicID == String.Empty) 660 if (dynamicID == String.Empty)
668 { 661 {
669 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 662 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
@@ -683,8 +676,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
683 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, 676 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
684 int timer, int alpha) 677 int timer, int alpha)
685 { 678 {
686 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlend");
687
688 if (dynamicID == String.Empty) 679 if (dynamicID == String.Empty)
689 { 680 {
690 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 681 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
@@ -704,8 +695,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
704 public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, 695 public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
705 bool blend, int disp, int timer, int alpha, int face) 696 bool blend, int disp, int timer, int alpha, int face)
706 { 697 {
707 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace");
708
709 if (dynamicID == String.Empty) 698 if (dynamicID == String.Empty)
710 { 699 {
711 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 700 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
@@ -731,8 +720,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
731 public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, 720 public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams,
732 int timer, int face) 721 int timer, int face)
733 { 722 {
734 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData");
735
736 if (dynamicID == String.Empty) 723 if (dynamicID == String.Empty)
737 { 724 {
738 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 725 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
@@ -760,8 +747,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
760 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, 747 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
761 int timer, int alpha) 748 int timer, int alpha)
762 { 749 {
763 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend");
764
765 if (dynamicID == String.Empty) 750 if (dynamicID == String.Empty)
766 { 751 {
767 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 752 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
@@ -788,8 +773,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
788 public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, 773 public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
789 bool blend, int disp, int timer, int alpha, int face) 774 bool blend, int disp, int timer, int alpha, int face)
790 { 775 {
791 CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace");
792
793 if (dynamicID == String.Empty) 776 if (dynamicID == String.Empty)
794 { 777 {
795 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 778 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
@@ -989,22 +972,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
989 public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) 972 public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
990 { 973 {
991 // Threat level None because this is what can already be done with the World Map in the viewer 974 // Threat level None because this is what can already be done with the World Map in the viewer
992 CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
993
994 TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); 975 TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat);
995 } 976 }
996 977
997 public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) 978 public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
998 { 979 {
999 CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
1000
1001 TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat); 980 TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat);
1002 } 981 }
1003 982
1004 public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) 983 public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
1005 { 984 {
1006 CheckThreatLevel(ThreatLevel.None, "osTeleportOwner");
1007
1008 osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); 985 osTeleportAgent(m_host.OwnerID.ToString(), position, lookat);
1009 } 986 }
1010 987
@@ -1062,8 +1039,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1062 { 1039 {
1063 // threat level is None as we could get this information with an 1040 // threat level is None as we could get this information with an
1064 // in-world script as well, just not as efficient 1041 // in-world script as well, just not as efficient
1065 CheckThreatLevel(ThreatLevel.None, "osGetAgents");
1066
1067 LSL_List result = new LSL_List(); 1042 LSL_List result = new LSL_List();
1068 World.ForEachRootScenePresence(delegate(ScenePresence sp) 1043 World.ForEachRootScenePresence(delegate(ScenePresence sp)
1069 { 1044 {
@@ -1173,104 +1148,78 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1173 1148
1174 public string osDrawResetTransform(string drawList) 1149 public string osDrawResetTransform(string drawList)
1175 { 1150 {
1176 CheckThreatLevel();
1177
1178 drawList += "ResetTransf;"; 1151 drawList += "ResetTransf;";
1179 return drawList; 1152 return drawList;
1180 } 1153 }
1181 1154
1182 public string osDrawRotationTransform(string drawList, LSL_Float x) 1155 public string osDrawRotationTransform(string drawList, LSL_Float x)
1183 { 1156 {
1184 CheckThreatLevel();
1185
1186 drawList += "RotTransf " + x + ";"; 1157 drawList += "RotTransf " + x + ";";
1187 return drawList; 1158 return drawList;
1188 } 1159 }
1189 1160
1190 public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) 1161 public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y)
1191 { 1162 {
1192 CheckThreatLevel();
1193
1194 drawList += "ScaleTransf " + x + "," + y + ";"; 1163 drawList += "ScaleTransf " + x + "," + y + ";";
1195 return drawList; 1164 return drawList;
1196 } 1165 }
1197 1166
1198 public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) 1167 public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y)
1199 { 1168 {
1200 CheckThreatLevel();
1201
1202 drawList += "TransTransf " + x + "," + y + ";"; 1169 drawList += "TransTransf " + x + "," + y + ";";
1203 return drawList; 1170 return drawList;
1204 } 1171 }
1205 1172
1206 public string osMovePen(string drawList, int x, int y) 1173 public string osMovePen(string drawList, int x, int y)
1207 { 1174 {
1208 CheckThreatLevel();
1209
1210 drawList += "MoveTo " + x + "," + y + ";"; 1175 drawList += "MoveTo " + x + "," + y + ";";
1211 return drawList; 1176 return drawList;
1212 } 1177 }
1213 1178
1214 public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) 1179 public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
1215 { 1180 {
1216 CheckThreatLevel();
1217
1218 drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; 1181 drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; ";
1219 return drawList; 1182 return drawList;
1220 } 1183 }
1221 1184
1222 public string osDrawLine(string drawList, int endX, int endY) 1185 public string osDrawLine(string drawList, int endX, int endY)
1223 { 1186 {
1224 CheckThreatLevel();
1225
1226 drawList += "LineTo " + endX + "," + endY + "; "; 1187 drawList += "LineTo " + endX + "," + endY + "; ";
1227 return drawList; 1188 return drawList;
1228 } 1189 }
1229 1190
1230 public string osDrawText(string drawList, string text) 1191 public string osDrawText(string drawList, string text)
1231 { 1192 {
1232 CheckThreatLevel(ThreatLevel.None, "osDrawText");
1233
1234 drawList += "Text " + text + "; "; 1193 drawList += "Text " + text + "; ";
1235 return drawList; 1194 return drawList;
1236 } 1195 }
1237 1196
1238 public string osDrawEllipse(string drawList, int width, int height) 1197 public string osDrawEllipse(string drawList, int width, int height)
1239 { 1198 {
1240 CheckThreatLevel();
1241
1242 drawList += "Ellipse " + width + "," + height + "; "; 1199 drawList += "Ellipse " + width + "," + height + "; ";
1243 return drawList; 1200 return drawList;
1244 } 1201 }
1245 1202
1246 public string osDrawFilledEllipse(string drawList, int width, int height) 1203 public string osDrawFilledEllipse(string drawList, int width, int height)
1247 { 1204 {
1248 CheckThreatLevel();
1249
1250 drawList += "FillEllipse " + width + "," + height + "; "; 1205 drawList += "FillEllipse " + width + "," + height + "; ";
1251 return drawList; 1206 return drawList;
1252 } 1207 }
1253 1208
1254 public string osDrawRectangle(string drawList, int width, int height) 1209 public string osDrawRectangle(string drawList, int width, int height)
1255 { 1210 {
1256 CheckThreatLevel();
1257
1258 drawList += "Rectangle " + width + "," + height + "; "; 1211 drawList += "Rectangle " + width + "," + height + "; ";
1259 return drawList; 1212 return drawList;
1260 } 1213 }
1261 1214
1262 public string osDrawFilledRectangle(string drawList, int width, int height) 1215 public string osDrawFilledRectangle(string drawList, int width, int height)
1263 { 1216 {
1264 CheckThreatLevel();
1265
1266 drawList += "FillRectangle " + width + "," + height + "; "; 1217 drawList += "FillRectangle " + width + "," + height + "; ";
1267 return drawList; 1218 return drawList;
1268 } 1219 }
1269 1220
1270 public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) 1221 public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
1271 { 1222 {
1272 CheckThreatLevel();
1273
1274 if (x.Length != y.Length || x.Length < 3) 1223 if (x.Length != y.Length || x.Length < 3)
1275 { 1224 {
1276 return ""; 1225 return "";
@@ -1286,8 +1235,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1286 1235
1287 public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) 1236 public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
1288 { 1237 {
1289 CheckThreatLevel();
1290
1291 if (x.Length != y.Length || x.Length < 3) 1238 if (x.Length != y.Length || x.Length < 3)
1292 { 1239 {
1293 return ""; 1240 return "";
@@ -1303,32 +1250,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1303 1250
1304 public string osSetFontSize(string drawList, int fontSize) 1251 public string osSetFontSize(string drawList, int fontSize)
1305 { 1252 {
1306 CheckThreatLevel();
1307
1308 drawList += "FontSize "+ fontSize +"; "; 1253 drawList += "FontSize "+ fontSize +"; ";
1309 return drawList; 1254 return drawList;
1310 } 1255 }
1311 1256
1312 public string osSetFontName(string drawList, string fontName) 1257 public string osSetFontName(string drawList, string fontName)
1313 { 1258 {
1314 CheckThreatLevel();
1315
1316 drawList += "FontName "+ fontName +"; "; 1259 drawList += "FontName "+ fontName +"; ";
1317 return drawList; 1260 return drawList;
1318 } 1261 }
1319 1262
1320 public string osSetPenSize(string drawList, int penSize) 1263 public string osSetPenSize(string drawList, int penSize)
1321 { 1264 {
1322 CheckThreatLevel();
1323
1324 drawList += "PenSize " + penSize + "; "; 1265 drawList += "PenSize " + penSize + "; ";
1325 return drawList; 1266 return drawList;
1326 } 1267 }
1327 1268
1328 public string osSetPenColor(string drawList, string color) 1269 public string osSetPenColor(string drawList, string color)
1329 { 1270 {
1330 CheckThreatLevel();
1331
1332 drawList += "PenColor " + color + "; "; 1271 drawList += "PenColor " + color + "; ";
1333 return drawList; 1272 return drawList;
1334 } 1273 }
@@ -1336,7 +1275,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1336 // Deprecated 1275 // Deprecated
1337 public string osSetPenColour(string drawList, string colour) 1276 public string osSetPenColour(string drawList, string colour)
1338 { 1277 {
1339 CheckThreatLevel();
1340 OSSLDeprecated("osSetPenColour", "osSetPenColor"); 1278 OSSLDeprecated("osSetPenColour", "osSetPenColor");
1341 1279
1342 drawList += "PenColour " + colour + "; "; 1280 drawList += "PenColour " + colour + "; ";
@@ -1345,24 +1283,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1345 1283
1346 public string osSetPenCap(string drawList, string direction, string type) 1284 public string osSetPenCap(string drawList, string direction, string type)
1347 { 1285 {
1348 CheckThreatLevel();
1349
1350 drawList += "PenCap " + direction + "," + type + "; "; 1286 drawList += "PenCap " + direction + "," + type + "; ";
1351 return drawList; 1287 return drawList;
1352 } 1288 }
1353 1289
1354 public string osDrawImage(string drawList, int width, int height, string imageUrl) 1290 public string osDrawImage(string drawList, int width, int height, string imageUrl)
1355 { 1291 {
1356 CheckThreatLevel();
1357
1358 drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; 1292 drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ;
1359 return drawList; 1293 return drawList;
1360 } 1294 }
1361 1295
1362 public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) 1296 public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
1363 { 1297 {
1364 CheckThreatLevel();
1365
1366 LSL_Vector vec = new LSL_Vector(0,0,0); 1298 LSL_Vector vec = new LSL_Vector(0,0,0);
1367 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 1299 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
1368 if (textureManager != null) 1300 if (textureManager != null)
@@ -1403,7 +1335,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1403 /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> 1335 /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
1404 public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour) 1336 public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
1405 { 1337 {
1406 CheckThreatLevel(ThreatLevel.High, "osSetRegionSunSettings"); 1338 CheckThreatLevel(ThreatLevel.Nuisance, "osSetRegionSunSettings");
1407 1339
1408 while (sunHour > 24.0) 1340 while (sunHour > 24.0)
1409 sunHour -= 24.0; 1341 sunHour -= 24.0;
@@ -1426,7 +1358,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1426 /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> 1358 /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
1427 public void osSetEstateSunSettings(bool sunFixed, double sunHour) 1359 public void osSetEstateSunSettings(bool sunFixed, double sunHour)
1428 { 1360 {
1429 CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings"); 1361 CheckThreatLevel(ThreatLevel.Nuisance, "osSetEstateSunSettings");
1430 1362
1431 while (sunHour > 24.0) 1363 while (sunHour > 24.0)
1432 sunHour -= 24.0; 1364 sunHour -= 24.0;
@@ -1448,8 +1380,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1448 /// <returns></returns> 1380 /// <returns></returns>
1449 public double osGetCurrentSunHour() 1381 public double osGetCurrentSunHour()
1450 { 1382 {
1451 CheckThreatLevel();
1452
1453 // Must adjust for the fact that Region Sun Settings are still LL offset 1383 // Must adjust for the fact that Region Sun Settings are still LL offset
1454 double sunHour = World.RegionInfo.RegionSettings.SunPosition - 6; 1384 double sunHour = World.RegionInfo.RegionSettings.SunPosition - 6;
1455 1385
@@ -1465,14 +1395,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1465 1395
1466 public double osSunGetParam(string param) 1396 public double osSunGetParam(string param)
1467 { 1397 {
1468 CheckThreatLevel(ThreatLevel.None, "osSunGetParam");
1469 OSSLDeprecated("osSunGetParam", "osGetSunParam"); 1398 OSSLDeprecated("osSunGetParam", "osGetSunParam");
1470 return GetSunParam(param); 1399 return GetSunParam(param);
1471 } 1400 }
1472 1401
1473 public double osGetSunParam(string param) 1402 public double osGetSunParam(string param)
1474 { 1403 {
1475 CheckThreatLevel();
1476 return GetSunParam(param); 1404 return GetSunParam(param);
1477 } 1405 }
1478 1406
@@ -1491,14 +1419,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1491 1419
1492 public void osSunSetParam(string param, double value) 1420 public void osSunSetParam(string param, double value)
1493 { 1421 {
1494 CheckThreatLevel(ThreatLevel.None, "osSunSetParam"); 1422 CheckThreatLevel(ThreatLevel.Nuisance, "osSunSetParam");
1495 OSSLDeprecated("osSunSetParam", "osSetSunParam"); 1423 OSSLDeprecated("osSunSetParam", "osSetSunParam");
1496 SetSunParam(param, value); 1424 SetSunParam(param, value);
1497 } 1425 }
1498 1426
1499 public void osSetSunParam(string param, double value) 1427 public void osSetSunParam(string param, double value)
1500 { 1428 {
1501 CheckThreatLevel(ThreatLevel.None, "osSetSunParam"); 1429 CheckThreatLevel(ThreatLevel.Nuisance, "osSetSunParam");
1502 SetSunParam(param, value); 1430 SetSunParam(param, value);
1503 } 1431 }
1504 1432
@@ -1513,8 +1441,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1513 1441
1514 public string osWindActiveModelPluginName() 1442 public string osWindActiveModelPluginName()
1515 { 1443 {
1516 CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName");
1517
1518 IWindModule module = World.RequestModuleInterface<IWindModule>(); 1444 IWindModule module = World.RequestModuleInterface<IWindModule>();
1519 if (module != null) 1445 if (module != null)
1520 { 1446 {
@@ -1526,7 +1452,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1526 1452
1527 public void osSetWindParam(string plugin, string param, LSL_Float value) 1453 public void osSetWindParam(string plugin, string param, LSL_Float value)
1528 { 1454 {
1529 CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam"); 1455 CheckThreatLevel(ThreatLevel.Nuisance, "osSetWindParam");
1530 1456
1531 IWindModule module = World.RequestModuleInterface<IWindModule>(); 1457 IWindModule module = World.RequestModuleInterface<IWindModule>();
1532 if (module != null) 1458 if (module != null)
@@ -1541,8 +1467,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1541 1467
1542 public LSL_Float osGetWindParam(string plugin, string param) 1468 public LSL_Float osGetWindParam(string plugin, string param)
1543 { 1469 {
1544 CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam");
1545
1546 IWindModule module = World.RequestModuleInterface<IWindModule>(); 1470 IWindModule module = World.RequestModuleInterface<IWindModule>();
1547 if (module != null) 1471 if (module != null)
1548 { 1472 {
@@ -1782,8 +1706,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1782 // is not allowed to contain any. 1706 // is not allowed to contain any.
1783 // This really should be removed. 1707 // This really should be removed.
1784 // 1708 //
1785 CheckThreatLevel();
1786
1787 if (index < 0) 1709 if (index < 0)
1788 { 1710 {
1789 index = src.Length + index; 1711 index = src.Length + index;
@@ -1839,7 +1761,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1839 // that trigger engine-specific failures. 1761 // that trigger engine-specific failures.
1840 // Besides, public grid users aren't supposed to know. 1762 // Besides, public grid users aren't supposed to know.
1841 // 1763 //
1842 CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName"); 1764 // And yet, they get to choose the engine in their scripts. Pfffft
1765// CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName");
1843 1766
1844 int scriptEngineNameIndex = 0; 1767 int scriptEngineNameIndex = 0;
1845 1768
@@ -1865,8 +1788,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1865 1788
1866 public LSL_Integer osCheckODE() 1789 public LSL_Integer osCheckODE()
1867 { 1790 {
1868 CheckThreatLevel();
1869
1870 LSL_Integer ret = 0; // false 1791 LSL_Integer ret = 0; // false
1871 if (m_ScriptEngine.World.PhysicsScene != null) 1792 if (m_ScriptEngine.World.PhysicsScene != null)
1872 { 1793 {
@@ -1892,7 +1813,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1892 1813
1893 m_host.AddScriptLPS(1); 1814 m_host.AddScriptLPS(1);
1894 string ret = String.Empty; 1815 string ret = String.Empty;
1895 if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) 1816// if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType")))
1896 { 1817 {
1897 if (m_ScriptEngine.World.PhysicsScene != null) 1818 if (m_ScriptEngine.World.PhysicsScene != null)
1898 { 1819 {
@@ -1928,7 +1849,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1928 // require their user to know what they are doing (see script 1849 // require their user to know what they are doing (see script
1929 // kiddie) 1850 // kiddie)
1930 // 1851 //
1931 CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); 1852 // Or they could check in the About window. Pfffft
1853// CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion");
1932 1854
1933 return m_ScriptEngine.World.GetSimulatorVersion(); 1855 return m_ScriptEngine.World.GetSimulatorVersion();
1934 } 1856 }
@@ -1972,8 +1894,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1972 1894
1973 public Object osParseJSONNew(string JSON) 1895 public Object osParseJSONNew(string JSON)
1974 { 1896 {
1975 CheckThreatLevel(ThreatLevel.None, "osParseJSONNew");
1976
1977 try 1897 try
1978 { 1898 {
1979 OSD decoded = OSDParser.DeserializeJson(JSON); 1899 OSD decoded = OSDParser.DeserializeJson(JSON);
@@ -1988,8 +1908,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1988 1908
1989 public Hashtable osParseJSON(string JSON) 1909 public Hashtable osParseJSON(string JSON)
1990 { 1910 {
1991 CheckThreatLevel(ThreatLevel.None, "osParseJSON");
1992
1993 Object decoded = osParseJSONNew(JSON); 1911 Object decoded = osParseJSONNew(JSON);
1994 1912
1995 if ( decoded is Hashtable ) { 1913 if ( decoded is Hashtable ) {
@@ -2019,8 +1937,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2019 /// <param name="message"></param> 1937 /// <param name="message"></param>
2020 public void osMessageObject(LSL_Key objectUUID, string message) 1938 public void osMessageObject(LSL_Key objectUUID, string message)
2021 { 1939 {
2022 CheckThreatLevel(ThreatLevel.Low, "osMessageObject");
2023
2024 UUID objUUID; 1940 UUID objUUID;
2025 if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. 1941 if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead.
2026 { 1942 {
@@ -2059,7 +1975,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2059// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); 1975// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie");
2060 // if this is restricted to objects rezzed by this host level can be reduced 1976 // if this is restricted to objects rezzed by this host level can be reduced
2061 1977
2062 CheckThreatLevel(ThreatLevel.Low, "osDie"); 1978// CheckThreatLevel(ThreatLevel.Low, "osDie");
2063 1979
2064 UUID objUUID; 1980 UUID objUUID;
2065 if (!UUID.TryParse(objectUUID, out objUUID)) 1981 if (!UUID.TryParse(objectUUID, out objUUID))
@@ -2108,7 +2024,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2108 /// <param name="contents">The contents of the notecard.</param> 2024 /// <param name="contents">The contents of the notecard.</param>
2109 public void osMakeNotecard(string notecardName, LSL_Types.list contents) 2025 public void osMakeNotecard(string notecardName, LSL_Types.list contents)
2110 { 2026 {
2111 CheckThreatLevel(ThreatLevel.High, "osMakeNotecard"); 2027// CheckThreatLevel(ThreatLevel.High, "osMakeNotecard");
2112 2028
2113 StringBuilder notecardData = new StringBuilder(); 2029 StringBuilder notecardData = new StringBuilder();
2114 2030
@@ -2293,7 +2209,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2293 /// <returns>Notecard line</returns> 2209 /// <returns>Notecard line</returns>
2294 public string osGetNotecardLine(string name, int line) 2210 public string osGetNotecardLine(string name, int line)
2295 { 2211 {
2296 CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine"); 2212// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine");
2297 2213
2298 UUID assetID = CacheNotecard(name); 2214 UUID assetID = CacheNotecard(name);
2299 2215
@@ -2320,7 +2236,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2320 /// <returns>Notecard text</returns> 2236 /// <returns>Notecard text</returns>
2321 public string osGetNotecard(string name) 2237 public string osGetNotecard(string name)
2322 { 2238 {
2323 CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard"); 2239// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard");
2324 2240
2325 string text = LoadNotecard(name); 2241 string text = LoadNotecard(name);
2326 2242
@@ -2349,7 +2265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2349 /// <returns></returns> 2265 /// <returns></returns>
2350 public int osGetNumberOfNotecardLines(string name) 2266 public int osGetNumberOfNotecardLines(string name)
2351 { 2267 {
2352 CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines"); 2268// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines");
2353 2269
2354 UUID assetID = CacheNotecard(name); 2270 UUID assetID = CacheNotecard(name);
2355 2271
@@ -2415,8 +2331,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2415 2331
2416 public string osKey2Name(string id) 2332 public string osKey2Name(string id)
2417 { 2333 {
2418 CheckThreatLevel(ThreatLevel.Low, "osKey2Name");
2419
2420 UUID key = new UUID(); 2334 UUID key = new UUID();
2421 2335
2422 if (UUID.TryParse(id, out key)) 2336 if (UUID.TryParse(id, out key))
@@ -2524,7 +2438,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2524 /// <returns></returns> 2438 /// <returns></returns>
2525 public string osGetGridNick() 2439 public string osGetGridNick()
2526 { 2440 {
2527 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); 2441// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick");
2528 2442
2529 string nick = String.Empty; 2443 string nick = String.Empty;
2530 IConfigSource config = m_ScriptEngine.ConfigSource; 2444 IConfigSource config = m_ScriptEngine.ConfigSource;
@@ -2540,7 +2454,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2540 2454
2541 public string osGetGridName() 2455 public string osGetGridName()
2542 { 2456 {
2543 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); 2457// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName");
2544 2458
2545 string name = String.Empty; 2459 string name = String.Empty;
2546 IConfigSource config = m_ScriptEngine.ConfigSource; 2460 IConfigSource config = m_ScriptEngine.ConfigSource;
@@ -2556,7 +2470,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2556 2470
2557 public string osGetGridLoginURI() 2471 public string osGetGridLoginURI()
2558 { 2472 {
2559 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); 2473// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI");
2560 2474
2561 string loginURI = String.Empty; 2475 string loginURI = String.Empty;
2562 IConfigSource config = m_ScriptEngine.ConfigSource; 2476 IConfigSource config = m_ScriptEngine.ConfigSource;
@@ -2572,7 +2486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2572 2486
2573 public string osGetGridHomeURI() 2487 public string osGetGridHomeURI()
2574 { 2488 {
2575 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); 2489// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI");
2576 2490
2577 IConfigSource config = m_ScriptEngine.ConfigSource; 2491 IConfigSource config = m_ScriptEngine.ConfigSource;
2578 string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", 2492 string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI",
@@ -2611,7 +2525,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2611 2525
2612 public string osGetGridCustom(string key) 2526 public string osGetGridCustom(string key)
2613 { 2527 {
2614 CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom"); 2528// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom");
2615 2529
2616 string retval = String.Empty; 2530 string retval = String.Empty;
2617 IConfigSource config = m_ScriptEngine.ConfigSource; 2531 IConfigSource config = m_ScriptEngine.ConfigSource;
@@ -2627,7 +2541,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2627 2541
2628 public string osGetAvatarHomeURI(string uuid) 2542 public string osGetAvatarHomeURI(string uuid)
2629 { 2543 {
2630 CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI"); 2544// CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI");
2631 2545
2632 IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface<IUserManagement>(); 2546 IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface<IUserManagement>();
2633 string returnValue = ""; 2547 string returnValue = "";
@@ -2659,15 +2573,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2659 2573
2660 public LSL_String osFormatString(string str, LSL_List strings) 2574 public LSL_String osFormatString(string str, LSL_List strings)
2661 { 2575 {
2662 CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString");
2663
2664 return String.Format(str, strings.Data); 2576 return String.Format(str, strings.Data);
2665 } 2577 }
2666 2578
2667 public LSL_List osMatchString(string src, string pattern, int start) 2579 public LSL_List osMatchString(string src, string pattern, int start)
2668 { 2580 {
2669 CheckThreatLevel(ThreatLevel.VeryLow, "osMatchString");
2670
2671 LSL_List result = new LSL_List(); 2581 LSL_List result = new LSL_List();
2672 2582
2673 // Normalize indices (if negative). 2583 // Normalize indices (if negative).
@@ -2707,8 +2617,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2707 2617
2708 public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) 2618 public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
2709 { 2619 {
2710 CheckThreatLevel(ThreatLevel.VeryLow, "osReplaceString");
2711
2712 // Normalize indices (if negative). 2620 // Normalize indices (if negative).
2713 // After normlaization they may still be 2621 // After normlaization they may still be
2714 // negative, but that is now relative to 2622 // negative, but that is now relative to
@@ -2731,22 +2639,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2731 2639
2732 public string osLoadedCreationDate() 2640 public string osLoadedCreationDate()
2733 { 2641 {
2734 CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate");
2735
2736 return World.RegionInfo.RegionSettings.LoadedCreationDate; 2642 return World.RegionInfo.RegionSettings.LoadedCreationDate;
2737 } 2643 }
2738 2644
2739 public string osLoadedCreationTime() 2645 public string osLoadedCreationTime()
2740 { 2646 {
2741 CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime");
2742
2743 return World.RegionInfo.RegionSettings.LoadedCreationTime; 2647 return World.RegionInfo.RegionSettings.LoadedCreationTime;
2744 } 2648 }
2745 2649
2746 public string osLoadedCreationID() 2650 public string osLoadedCreationID()
2747 { 2651 {
2748 CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID");
2749
2750 return World.RegionInfo.RegionSettings.LoadedCreationID; 2652 return World.RegionInfo.RegionSettings.LoadedCreationID;
2751 } 2653 }
2752 2654
@@ -2765,7 +2667,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2765 /// <returns></returns> 2667 /// <returns></returns>
2766 public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules) 2668 public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
2767 { 2669 {
2768 CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams"); 2670 CheckThreatLevel(ThreatLevel.VeryLow, "osGetLinkPrimitiveParams");
2769 2671
2770 InitLSL(); 2672 InitLSL();
2771 // One needs to cast m_LSL_Api because we're using functions not 2673 // One needs to cast m_LSL_Api because we're using functions not
@@ -2817,8 +2719,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2817 2719
2818 public LSL_Integer osIsNpc(LSL_Key npc) 2720 public LSL_Integer osIsNpc(LSL_Key npc)
2819 { 2721 {
2820 CheckThreatLevel();
2821
2822 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2722 INPCModule module = World.RequestModuleInterface<INPCModule>();
2823 if (module != null) 2723 if (module != null)
2824 { 2724 {
@@ -2989,8 +2889,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2989 /// <returns>The asset ID of the notecard saved.</returns> 2889 /// <returns>The asset ID of the notecard saved.</returns>
2990 public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) 2890 public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard)
2991 { 2891 {
2992 CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance");
2993
2994 INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); 2892 INPCModule npcModule = World.RequestModuleInterface<INPCModule>();
2995 2893
2996 if (npcModule != null) 2894 if (npcModule != null)
@@ -3010,8 +2908,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3010 2908
3011 public void osNpcLoadAppearance(LSL_Key npc, string notecard) 2909 public void osNpcLoadAppearance(LSL_Key npc, string notecard)
3012 { 2910 {
3013 CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance");
3014
3015 INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); 2911 INPCModule npcModule = World.RequestModuleInterface<INPCModule>();
3016 2912
3017 if (npcModule != null) 2913 if (npcModule != null)
@@ -3041,8 +2937,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3041 2937
3042 public LSL_Key osNpcGetOwner(LSL_Key npc) 2938 public LSL_Key osNpcGetOwner(LSL_Key npc)
3043 { 2939 {
3044 CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner");
3045
3046 INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); 2940 INPCModule npcModule = World.RequestModuleInterface<INPCModule>();
3047 if (npcModule != null) 2941 if (npcModule != null)
3048 { 2942 {
@@ -3062,8 +2956,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3062 2956
3063 public LSL_Vector osNpcGetPos(LSL_Key npc) 2957 public LSL_Vector osNpcGetPos(LSL_Key npc)
3064 { 2958 {
3065 CheckThreatLevel(ThreatLevel.High, "osNpcGetPos");
3066
3067 INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); 2959 INPCModule npcModule = World.RequestModuleInterface<INPCModule>();
3068 if (npcModule != null) 2960 if (npcModule != null)
3069 { 2961 {
@@ -3085,8 +2977,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3085 2977
3086 public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) 2978 public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos)
3087 { 2979 {
3088 CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo");
3089
3090 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2980 INPCModule module = World.RequestModuleInterface<INPCModule>();
3091 if (module != null) 2981 if (module != null)
3092 { 2982 {
@@ -3103,8 +2993,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3103 2993
3104 public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) 2994 public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options)
3105 { 2995 {
3106 CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget");
3107
3108 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2996 INPCModule module = World.RequestModuleInterface<INPCModule>();
3109 if (module != null) 2997 if (module != null)
3110 { 2998 {
@@ -3127,8 +3015,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3127 3015
3128 public LSL_Rotation osNpcGetRot(LSL_Key npc) 3016 public LSL_Rotation osNpcGetRot(LSL_Key npc)
3129 { 3017 {
3130 CheckThreatLevel(ThreatLevel.High, "osNpcGetRot");
3131
3132 INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); 3018 INPCModule npcModule = World.RequestModuleInterface<INPCModule>();
3133 if (npcModule != null) 3019 if (npcModule != null)
3134 { 3020 {
@@ -3150,8 +3036,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3150 3036
3151 public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) 3037 public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation)
3152 { 3038 {
3153 CheckThreatLevel(ThreatLevel.High, "osNpcSetRot");
3154
3155 INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); 3039 INPCModule npcModule = World.RequestModuleInterface<INPCModule>();
3156 if (npcModule != null) 3040 if (npcModule != null)
3157 { 3041 {
@@ -3171,8 +3055,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3171 3055
3172 public void osNpcStopMoveToTarget(LSL_Key npc) 3056 public void osNpcStopMoveToTarget(LSL_Key npc)
3173 { 3057 {
3174 CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget");
3175
3176 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3058 INPCModule module = World.RequestModuleInterface<INPCModule>();
3177 if (module != null) 3059 if (module != null)
3178 { 3060 {
@@ -3187,8 +3069,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3187 3069
3188 public void osNpcSetProfileAbout(LSL_Key npc, string about) 3070 public void osNpcSetProfileAbout(LSL_Key npc, string about)
3189 { 3071 {
3190 CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout");
3191
3192 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3072 INPCModule module = World.RequestModuleInterface<INPCModule>();
3193 if (module != null) 3073 if (module != null)
3194 { 3074 {
@@ -3205,8 +3085,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3205 3085
3206 public void osNpcSetProfileImage(LSL_Key npc, string image) 3086 public void osNpcSetProfileImage(LSL_Key npc, string image)
3207 { 3087 {
3208 CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage");
3209
3210 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3088 INPCModule module = World.RequestModuleInterface<INPCModule>();
3211 if (module != null) 3089 if (module != null)
3212 { 3090 {
@@ -3238,8 +3116,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3238 3116
3239 public void osNpcSay(LSL_Key npc, int channel, string message) 3117 public void osNpcSay(LSL_Key npc, int channel, string message)
3240 { 3118 {
3241 CheckThreatLevel(ThreatLevel.High, "osNpcSay");
3242
3243 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3119 INPCModule module = World.RequestModuleInterface<INPCModule>();
3244 if (module != null) 3120 if (module != null)
3245 { 3121 {
@@ -3254,8 +3130,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3254 3130
3255 public void osNpcShout(LSL_Key npc, int channel, string message) 3131 public void osNpcShout(LSL_Key npc, int channel, string message)
3256 { 3132 {
3257 CheckThreatLevel(ThreatLevel.High, "osNpcShout");
3258
3259 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3133 INPCModule module = World.RequestModuleInterface<INPCModule>();
3260 if (module != null) 3134 if (module != null)
3261 { 3135 {
@@ -3270,8 +3144,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3270 3144
3271 public void osNpcSit(LSL_Key npc, LSL_Key target, int options) 3145 public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
3272 { 3146 {
3273 CheckThreatLevel(ThreatLevel.High, "osNpcSit");
3274
3275 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3147 INPCModule module = World.RequestModuleInterface<INPCModule>();
3276 if (module != null) 3148 if (module != null)
3277 { 3149 {
@@ -3286,8 +3158,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3286 3158
3287 public void osNpcStand(LSL_Key npc) 3159 public void osNpcStand(LSL_Key npc)
3288 { 3160 {
3289 CheckThreatLevel(ThreatLevel.High, "osNpcStand");
3290
3291 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3161 INPCModule module = World.RequestModuleInterface<INPCModule>();
3292 if (module != null) 3162 if (module != null)
3293 { 3163 {
@@ -3302,8 +3172,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3302 3172
3303 public void osNpcRemove(LSL_Key npc) 3173 public void osNpcRemove(LSL_Key npc)
3304 { 3174 {
3305 CheckThreatLevel(ThreatLevel.High, "osNpcRemove");
3306
3307 try 3175 try
3308 { 3176 {
3309 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3177 INPCModule module = World.RequestModuleInterface<INPCModule>();
@@ -3322,8 +3190,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3322 3190
3323 public void osNpcPlayAnimation(LSL_Key npc, string animation) 3191 public void osNpcPlayAnimation(LSL_Key npc, string animation)
3324 { 3192 {
3325 CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation");
3326
3327 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3193 INPCModule module = World.RequestModuleInterface<INPCModule>();
3328 if (module != null) 3194 if (module != null)
3329 { 3195 {
@@ -3336,8 +3202,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3336 3202
3337 public void osNpcStopAnimation(LSL_Key npc, string animation) 3203 public void osNpcStopAnimation(LSL_Key npc, string animation)
3338 { 3204 {
3339 CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation");
3340
3341 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3205 INPCModule module = World.RequestModuleInterface<INPCModule>();
3342 if (module != null) 3206 if (module != null)
3343 { 3207 {
@@ -3350,8 +3214,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3350 3214
3351 public void osNpcWhisper(LSL_Key npc, int channel, string message) 3215 public void osNpcWhisper(LSL_Key npc, int channel, string message)
3352 { 3216 {
3353 CheckThreatLevel(ThreatLevel.High, "osNpcWhisper");
3354
3355 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3217 INPCModule module = World.RequestModuleInterface<INPCModule>();
3356 if (module != null) 3218 if (module != null)
3357 { 3219 {
@@ -3366,8 +3228,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3366 3228
3367 public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num) 3229 public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
3368 { 3230 {
3369 CheckThreatLevel(ThreatLevel.High, "osNpcTouch");
3370
3371 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3231 INPCModule module = World.RequestModuleInterface<INPCModule>();
3372 int linkNum = link_num.value; 3232 int linkNum = link_num.value;
3373 if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS)) 3233 if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS))
@@ -3410,8 +3270,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3410 /// <returns>The asset ID of the notecard saved.</returns> 3270 /// <returns>The asset ID of the notecard saved.</returns>
3411 public LSL_Key osOwnerSaveAppearance(string notecard) 3271 public LSL_Key osOwnerSaveAppearance(string notecard)
3412 { 3272 {
3413 CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance");
3414
3415 return SaveAppearanceToNotecard(m_host.OwnerID, notecard); 3273 return SaveAppearanceToNotecard(m_host.OwnerID, notecard);
3416 } 3274 }
3417 3275
@@ -3469,8 +3327,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3469 /// <returns>"male" or "female" or "unknown"</returns> 3327 /// <returns>"male" or "female" or "unknown"</returns>
3470 public LSL_String osGetGender(LSL_Key rawAvatarId) 3328 public LSL_String osGetGender(LSL_Key rawAvatarId)
3471 { 3329 {
3472 CheckThreatLevel(ThreatLevel.None, "osGetGender");
3473
3474 UUID avatarId; 3330 UUID avatarId;
3475 if (!UUID.TryParse(rawAvatarId, out avatarId)) 3331 if (!UUID.TryParse(rawAvatarId, out avatarId))
3476 return new LSL_String("unknown"); 3332 return new LSL_String("unknown");
@@ -3512,8 +3368,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3512 /// <returns></returns> 3368 /// <returns></returns>
3513 public LSL_Key osGetMapTexture() 3369 public LSL_Key osGetMapTexture()
3514 { 3370 {
3515 CheckThreatLevel();
3516
3517 return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); 3371 return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString();
3518 } 3372 }
3519 3373
@@ -3524,8 +3378,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3524 /// <returns></returns> 3378 /// <returns></returns>
3525 public LSL_Key osGetRegionMapTexture(string regionName) 3379 public LSL_Key osGetRegionMapTexture(string regionName)
3526 { 3380 {
3527 CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture");
3528
3529 Scene scene = m_ScriptEngine.World; 3381 Scene scene = m_ScriptEngine.World;
3530 UUID key = UUID.Zero; 3382 UUID key = UUID.Zero;
3531 GridRegion region; 3383 GridRegion region;
@@ -3568,8 +3420,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3568 3420
3569 public LSL_Vector osGetRegionSize() 3421 public LSL_Vector osGetRegionSize()
3570 { 3422 {
3571 CheckThreatLevel();
3572
3573 Scene scene = m_ScriptEngine.World; 3423 Scene scene = m_ScriptEngine.World;
3574 RegionInfo reg = World.RegionInfo; 3424 RegionInfo reg = World.RegionInfo;
3575// GridRegion region = scene.GridService.GetRegionByUUID(UUID.Zero, World.RegionInfo.RegionID); 3425// GridRegion region = scene.GridService.GetRegionByUUID(UUID.Zero, World.RegionInfo.RegionID);
@@ -3637,8 +3487,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3637 3487
3638 public LSL_Float osGetHealth(string avatar) 3488 public LSL_Float osGetHealth(string avatar)
3639 { 3489 {
3640 CheckThreatLevel(ThreatLevel.None, "osGetHealth");
3641
3642 LSL_Float health = new LSL_Float(-1); 3490 LSL_Float health = new LSL_Float(-1);
3643 ScenePresence presence = World.GetScenePresence(new UUID(avatar)); 3491 ScenePresence presence = World.GetScenePresence(new UUID(avatar));
3644 if (presence != null) 3492 if (presence != null)
@@ -3723,8 +3571,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3723 3571
3724 public LSL_Float osGetHealRate(string avatar) 3572 public LSL_Float osGetHealRate(string avatar)
3725 { 3573 {
3726 CheckThreatLevel(ThreatLevel.None, "osGetHealRate");
3727
3728 LSL_Float rate = new LSL_Float(0); 3574 LSL_Float rate = new LSL_Float(0);
3729 ScenePresence presence = World.GetScenePresence(new UUID(avatar)); 3575 ScenePresence presence = World.GetScenePresence(new UUID(avatar));
3730 if (presence != null) 3576 if (presence != null)
@@ -3742,7 +3588,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3742 3588
3743 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) 3589 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
3744 { 3590 {
3745 CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams"); 3591 CheckThreatLevel(ThreatLevel.VeryLow, "osSetPrimitiveParams");
3746 3592
3747 InitLSL(); 3593 InitLSL();
3748 m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); 3594 m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams");
@@ -3791,8 +3637,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3791 /// <returns>Strided list of the UUID, position and name of each avatar in the region</returns> 3637 /// <returns>Strided list of the UUID, position and name of each avatar in the region</returns>
3792 public LSL_List osGetAvatarList() 3638 public LSL_List osGetAvatarList()
3793 { 3639 {
3794 CheckThreatLevel(ThreatLevel.None, "osGetAvatarList");
3795
3796 LSL_List result = new LSL_List(); 3640 LSL_List result = new LSL_List();
3797 World.ForEachRootScenePresence(delegate (ScenePresence avatar) 3641 World.ForEachRootScenePresence(delegate (ScenePresence avatar)
3798 { 3642 {
@@ -3809,8 +3653,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3809 3653
3810 public LSL_List osGetNPCList() 3654 public LSL_List osGetNPCList()
3811 { 3655 {
3812 CheckThreatLevel(ThreatLevel.None, "osGetNPCList");
3813
3814 LSL_List result = new LSL_List(); 3656 LSL_List result = new LSL_List();
3815 World.ForEachRootScenePresence(delegate (ScenePresence avatar) 3657 World.ForEachRootScenePresence(delegate (ScenePresence avatar)
3816 { 3658 {
@@ -3833,8 +3675,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3833 /// <returns></returns> 3675 /// <returns></returns>
3834 public LSL_String osUnixTimeToTimestamp(long time) 3676 public LSL_String osUnixTimeToTimestamp(long time)
3835 { 3677 {
3836 CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp");
3837
3838 long baseTicks = 621355968000000000; 3678 long baseTicks = 621355968000000000;
3839 long tickResolution = 10000000; 3679 long tickResolution = 10000000;
3840 long epochTicks = (time * tickResolution) + baseTicks; 3680 long epochTicks = (time * tickResolution) + baseTicks;
@@ -3850,8 +3690,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3850 /// <returns>Item description</returns> 3690 /// <returns>Item description</returns>
3851 public LSL_String osGetInventoryDesc(string item) 3691 public LSL_String osGetInventoryDesc(string item)
3852 { 3692 {
3853 CheckThreatLevel();
3854
3855 lock (m_host.TaskInventory) 3693 lock (m_host.TaskInventory)
3856 { 3694 {
3857 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 3695 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -4064,7 +3902,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4064 3902
4065 public void osForceDetachFromAvatar() 3903 public void osForceDetachFromAvatar()
4066 { 3904 {
4067 CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar"); 3905 CheckThreatLevel(ThreatLevel.VeryHigh, "osForceDetachFromAvatar");
4068 3906
4069 InitLSL(); 3907 InitLSL();
4070 ((LSL_Api)m_LSL_Api).DetachFromAvatar(); 3908 ((LSL_Api)m_LSL_Api).DetachFromAvatar();
@@ -4215,8 +4053,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4215 /// <returns>1 if thing is a valid UUID, 0 otherwise</returns> 4053 /// <returns>1 if thing is a valid UUID, 0 otherwise</returns>
4216 public LSL_Integer osIsUUID(string thing) 4054 public LSL_Integer osIsUUID(string thing)
4217 { 4055 {
4218 CheckThreatLevel();
4219
4220 UUID test; 4056 UUID test;
4221 return UUID.TryParse(thing, out test) ? 1 : 0; 4057 return UUID.TryParse(thing, out test) ? 1 : 0;
4222 } 4058 }
@@ -4229,8 +4065,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4229 /// <returns></returns> 4065 /// <returns></returns>
4230 public LSL_Float osMin(double a, double b) 4066 public LSL_Float osMin(double a, double b)
4231 { 4067 {
4232 CheckThreatLevel();
4233
4234 return Math.Min(a, b); 4068 return Math.Min(a, b);
4235 } 4069 }
4236 4070
@@ -4242,15 +4076,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4242 /// <returns></returns> 4076 /// <returns></returns>
4243 public LSL_Float osMax(double a, double b) 4077 public LSL_Float osMax(double a, double b)
4244 { 4078 {
4245 CheckThreatLevel();
4246
4247 return Math.Max(a, b); 4079 return Math.Max(a, b);
4248 } 4080 }
4249 4081
4250 public LSL_Key osGetRezzingObject() 4082 public LSL_Key osGetRezzingObject()
4251 { 4083 {
4252 CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject");
4253
4254 UUID rezID = m_host.ParentGroup.RezzerID; 4084 UUID rezID = m_host.ParentGroup.RezzerID;
4255 if(rezID == UUID.Zero || m_host.ParentGroup.Scene.GetScenePresence(rezID) != null) 4085 if(rezID == UUID.Zero || m_host.ParentGroup.Scene.GetScenePresence(rezID) != null)
4256 return new LSL_Key(UUID.Zero.ToString()); 4086 return new LSL_Key(UUID.Zero.ToString());
@@ -4352,8 +4182,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4352 4182
4353 public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) 4183 public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
4354 { 4184 {
4355 CheckThreatLevel(ThreatLevel.Low, "osListenRegex");
4356
4357 UUID keyID; 4185 UUID keyID;
4358 UUID.TryParse(ID, out keyID); 4186 UUID.TryParse(ID, out keyID);
4359 4187
@@ -4400,8 +4228,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4400 4228
4401 public LSL_Integer osRegexIsMatch(string input, string pattern) 4229 public LSL_Integer osRegexIsMatch(string input, string pattern)
4402 { 4230 {
4403 CheckThreatLevel(ThreatLevel.Low, "osRegexIsMatch");
4404
4405 try 4231 try
4406 { 4232 {
4407 return Regex.IsMatch(input, pattern) ? 1 : 0; 4233 return Regex.IsMatch(input, pattern) ? 1 : 0;
@@ -4449,8 +4275,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4449 4275
4450 public void osCollisionSound(string impact_sound, double impact_volume) 4276 public void osCollisionSound(string impact_sound, double impact_volume)
4451 { 4277 {
4452 CheckThreatLevel();
4453
4454 if(impact_sound == "") 4278 if(impact_sound == "")
4455 { 4279 {
4456 m_host.CollisionSoundVolume = (float)impact_volume; 4280 m_host.CollisionSoundVolume = (float)impact_volume;
@@ -4503,8 +4327,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4503 /// </returns> 4327 /// </returns>
4504 public LSL_List osGetInertiaData() 4328 public LSL_List osGetInertiaData()
4505 { 4329 {
4506 CheckThreatLevel();
4507
4508 LSL_List result = new LSL_List(); 4330 LSL_List result = new LSL_List();
4509 float TotalMass; 4331 float TotalMass;
4510 Vector3 CenterOfMass; 4332 Vector3 CenterOfMass;
@@ -4550,8 +4372,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4550 4372
4551 public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot) 4373 public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot)
4552 { 4374 {
4553 CheckThreatLevel();
4554
4555 SceneObjectGroup sog = m_host.ParentGroup; 4375 SceneObjectGroup sog = m_host.ParentGroup;
4556 if(sog== null || sog.IsDeleted) 4376 if(sog== null || sog.IsDeleted)
4557 return; 4377 return;
@@ -4588,8 +4408,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4588 /// </remarks> 4408 /// </remarks>
4589 public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot) 4409 public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot)
4590 { 4410 {
4591 CheckThreatLevel();
4592
4593 SceneObjectGroup sog = m_host.ParentGroup; 4411 SceneObjectGroup sog = m_host.ParentGroup;
4594 if(sog== null || sog.IsDeleted) 4412 if(sog== null || sog.IsDeleted)
4595 return; 4413 return;
@@ -4629,8 +4447,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4629 /// </remarks> 4447 /// </remarks>
4630 public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass) 4448 public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass)
4631 { 4449 {
4632 CheckThreatLevel();
4633
4634 SceneObjectGroup sog = m_host.ParentGroup; 4450 SceneObjectGroup sog = m_host.ParentGroup;
4635 if(sog== null || sog.IsDeleted) 4451 if(sog== null || sog.IsDeleted)
4636 return; 4452 return;
@@ -4668,8 +4484,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4668 /// </remarks> 4484 /// </remarks>
4669 public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot) 4485 public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot)
4670 { 4486 {
4671 CheckThreatLevel();
4672
4673 SceneObjectGroup sog = m_host.ParentGroup; 4487 SceneObjectGroup sog = m_host.ParentGroup;
4674 if(sog== null || sog.IsDeleted) 4488 if(sog== null || sog.IsDeleted)
4675 return; 4489 return;
@@ -4706,8 +4520,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4706 /// </summary> 4520 /// </summary>
4707 public void osClearInertia() 4521 public void osClearInertia()
4708 { 4522 {
4709 CheckThreatLevel();
4710
4711 SceneObjectGroup sog = m_host.ParentGroup; 4523 SceneObjectGroup sog = m_host.ParentGroup;
4712 if(sog== null || sog.IsDeleted) 4524 if(sog== null || sog.IsDeleted)
4713 return; 4525 return;
@@ -4792,8 +4604,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4792 4604
4793 public LSL_Integer osGetLinkNumber(LSL_String name) 4605 public LSL_Integer osGetLinkNumber(LSL_String name)
4794 { 4606 {
4795 CheckThreatLevel();
4796
4797 SceneObjectGroup sog = m_host.ParentGroup; 4607 SceneObjectGroup sog = m_host.ParentGroup;
4798 if(sog== null || sog.IsDeleted) 4608 if(sog== null || sog.IsDeleted)
4799 return -1; 4609 return -1;