diff options
author | onefang | 2019-07-04 02:02:34 +1000 |
---|---|---|
committer | onefang | 2019-07-04 02:02:34 +1000 |
commit | 740466e367af3afc39e9ca199207dc52c78f27cb (patch) | |
tree | 0fcdbe0092aef4b6d048e8e6cf95fa9d1a959a8d /1chatter.lsl | |
parent | Bump version to 0.12 test (diff) | |
download | 1ring-740466e367af3afc39e9ca199207dc52c78f27cb.zip 1ring-740466e367af3afc39e9ca199207dc52c78f27cb.tar.gz 1ring-740466e367af3afc39e9ca199207dc52c78f27cb.tar.bz2 1ring-740466e367af3afc39e9ca199207dc52c78f27cb.tar.xz |
New OhSilly Threat level detector, and actually use it.
Tries to work in all case.
Diffstat (limited to '1chatter.lsl')
-rw-r--r-- | 1chatter.lsl | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/1chatter.lsl b/1chatter.lsl index b3df84e..3ed1bac 100644 --- a/1chatter.lsl +++ b/1chatter.lsl | |||
@@ -1444,6 +1444,26 @@ d("lSCAN " + llDumpList2String(input, " ~ ")); | |||
1444 | listen(integer channel, string name, key id, string message) | 1444 | listen(integer channel, string name, key id, string message) |
1445 | { | 1445 | { |
1446 | //d("listen " + channel + ", " + llKey2Name(id) + "-> " + message + " " + llGetListLength(Musers)); | 1446 | //d("listen " + channel + ", " + llKey2Name(id) + "-> " + message + " " + llGetListLength(Musers)); |
1447 | // Catch OhSillyThreatLevel messages, from the probe. | ||
1448 | if (channel == DEBUG_CHANNEL) | ||
1449 | { | ||
1450 | key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); | ||
1451 | if (llGetLinkKey(LINK_ROOT) == root) | ||
1452 | { | ||
1453 | integer f = llSubStringIndex(message, "permission denied. "); | ||
1454 | if (-1 != f) | ||
1455 | { | ||
1456 | list e = llParseStringKeepNulls(llGetSubString(message, 0, -f), [" "], []); | ||
1457 | string function = llList2String(e, 0); | ||
1458 | if (("OSSL" == llList2String(e, 0)) && ("Runtime" == llList2String(e, 1)) && ("Error:" == llList2String(e, 2))) | ||
1459 | function = llList2String(e, 3); | ||
1460 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, function, "0"); | ||
1461 | llOwnerSay("Found naughty function " + function); | ||
1462 | return; | ||
1463 | } | ||
1464 | } | ||
1465 | } | ||
1466 | |||
1447 | // See if it's a prefix on the prefix channel, strip off the prefix and feed the remains to doThing(). | 1467 | // See if it's a prefix on the prefix channel, strip off the prefix and feed the remains to doThing(). |
1448 | if (channel == (integer) getSetting("1ring.CHANNEL")) | 1468 | if (channel == (integer) getSetting("1ring.CHANNEL")) |
1449 | { | 1469 | { |
@@ -1472,26 +1492,6 @@ d("listen 1ring.CHANNEL " + message + " -> " + button + " " + cmd + " " + data); | |||
1472 | return; | 1492 | return; |
1473 | } | 1493 | } |
1474 | } | 1494 | } |
1475 | |||
1476 | // Catch OhSillyThreatLevel messages. | ||
1477 | if (channel == DEBUG_CHANNEL) | ||
1478 | { | ||
1479 | key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); | ||
1480 | if ((llGetLinkKey(LINK_ROOT) == root) && ("OSSL Runtime Error: os" == llGetSubString(message, 0, 21))) | ||
1481 | { | ||
1482 | string function = llGetSubString(message, 20, -1); | ||
1483 | integer f = llSubStringIndex(function, " "); | ||
1484 | if (-1 != f) | ||
1485 | { | ||
1486 | if (" permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission." == llGetSubString(function, f, -1)) | ||
1487 | { | ||
1488 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, llGetSubString(function, 0, f - 1), id); | ||
1489 | llRegionSay(DEBUG_CHANNEL, "OPENSIM SUCKS!"); | ||
1490 | return; | ||
1491 | } | ||
1492 | } | ||
1493 | } | ||
1494 | } | ||
1495 | } | 1495 | } |
1496 | 1496 | ||
1497 | no_sensor() | 1497 | no_sensor() |