diff options
Diffstat (limited to '')
-rw-r--r-- | 1AOor2.lsl | 8 | ||||
-rw-r--r-- | 1chatter.lsl | 19 | ||||
-rw-r--r-- | 1ring.lsl | 2 | ||||
-rw-r--r-- | OhSillyThreatDetector.lsl | 79 | ||||
-rw-r--r-- | ~1ring.command.data.txt | 2 |
5 files changed, 63 insertions, 47 deletions
@@ -210,10 +210,10 @@ linky(integer num, string message, key id) | |||
210 | { | 210 | { |
211 | if (DEBUG_CHANNEL == num) | 211 | if (DEBUG_CHANNEL == num) |
212 | { | 212 | { |
213 | if ("osAvatarPlayAnimation" == message) doAnim = (integer) id; | 213 | if ("osAvatarPlayAnimation" == message) {doAnim = (integer) id; setSetting(Owner, "OSANIM", id, fLINK);} |
214 | if ("osAvatarStopAnimation" == message) doAnim = (integer) id; | 214 | if ("osAvatarStopAnimation" == message) {doAnim = (integer) id; setSetting(Owner, "OSANIM", id, fLINK);} |
215 | if ("osForceOtherSit" == message) doSit = (integer) id; | 215 | if ("osForceOtherSit" == message) {doSit = (integer) id; setSetting(Owner, "OSSIT", id, fLINK);} |
216 | if ("osSetSpeed" == message) doSpeed = FALSE; | 216 | if ("osSetSpeed" == message) {doSpeed = (integer) id; setSetting(Owner, "OSSPEEH", id, fLINK);} |
217 | } | 217 | } |
218 | if ((id != ScriptKey) && (id != NULL_KEY)) return; | 218 | if ((id != ScriptKey) && (id != NULL_KEY)) return; |
219 | list input = llParseStringKeepNulls(message, [lSEP], []); | 219 | list input = llParseStringKeepNulls(message, [lSEP], []); |
diff --git a/1chatter.lsl b/1chatter.lsl index b41df53..3c89a6f 100644 --- a/1chatter.lsl +++ b/1chatter.lsl | |||
@@ -11,6 +11,7 @@ key ScriptKey; | |||
11 | key LibraryKey; | 11 | key LibraryKey; |
12 | key Owner; | 12 | key Owner; |
13 | string URL; | 13 | string URL; |
14 | key grid; | ||
14 | 15 | ||
15 | list Commands; | 16 | list Commands; |
16 | integer cNAME = 0; | 17 | integer cNAME = 0; |
@@ -1106,6 +1107,8 @@ integer doThing(key id, string command, string fr, string cmd, string data, inte | |||
1106 | dt = llListReplaceList(dt, [], 0, 0); | 1107 | dt = llListReplaceList(dt, [], 0, 0); |
1107 | addEvent(time, fr + llDumpList2String(dt, " "), id); | 1108 | addEvent(time, fr + llDumpList2String(dt, " "), id); |
1108 | } | 1109 | } |
1110 | else if ("OHSILLYPROBE" == cmd) | ||
1111 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, "OHSILLYPROBE", llGetKey()); | ||
1109 | else | 1112 | else |
1110 | { | 1113 | { |
1111 | sendScript(them, lCMD, fr, [source, id, command, cmd, data]); | 1114 | sendScript(them, lCMD, fr, [source, id, command, cmd, data]); |
@@ -1276,6 +1279,7 @@ init() | |||
1276 | VelTime = llGetTimeOfDay(); | 1279 | VelTime = llGetTimeOfDay(); |
1277 | VelPos = llGetPos(); | 1280 | VelPos = llGetPos(); |
1278 | addEvent(300, "Musers", ScriptKey); | 1281 | addEvent(300, "Musers", ScriptKey); |
1282 | addEvent(30, "*.OHSILLYPROBE", ScriptKey); | ||
1279 | URLrequestID = llRequestURL(); | 1283 | URLrequestID = llRequestURL(); |
1280 | } | 1284 | } |
1281 | 1285 | ||
@@ -1288,6 +1292,7 @@ default | |||
1288 | d("\n\n1chatter resetting client scripts @ " + (string) Start + "\n"); | 1292 | d("\n\n1chatter resetting client scripts @ " + (string) Start + "\n"); |
1289 | ScriptName = llGetScriptName(); ScriptKey = llGetInventoryKey(ScriptName); | 1293 | ScriptName = llGetScriptName(); ScriptKey = llGetInventoryKey(ScriptName); |
1290 | LibraryKey = ScriptKey; | 1294 | LibraryKey = ScriptKey; |
1295 | grid = osGetGridName(); | ||
1291 | init(); | 1296 | init(); |
1292 | } | 1297 | } |
1293 | 1298 | ||
@@ -1305,6 +1310,13 @@ d("\n\n1chatter resetting client scripts @ " + (string) Start + "\n"); | |||
1305 | llResetScript(); | 1310 | llResetScript(); |
1306 | if (change & CHANGED_REGION) | 1311 | if (change & CHANGED_REGION) |
1307 | { | 1312 | { |
1313 | string newGrid = osGetGridName(); | ||
1314 | |||
1315 | if (newGrid != grid) | ||
1316 | { | ||
1317 | grid = newGrid; | ||
1318 | addEvent(30, "*.OHSILLYPROBE", ScriptKey); | ||
1319 | } | ||
1308 | llReleaseURL(URL); | 1320 | llReleaseURL(URL); |
1309 | URL = ""; | 1321 | URL = ""; |
1310 | URLrequestID = llRequestURL(); | 1322 | URLrequestID = llRequestURL(); |
@@ -1501,8 +1513,9 @@ d("lSCAN " + llDumpList2String(input, " ~ ")); | |||
1501 | // Catch OhSillyThreatLevel messages, from the probe. | 1513 | // Catch OhSillyThreatLevel messages, from the probe. |
1502 | if (channel == DEBUG_CHANNEL) | 1514 | if (channel == DEBUG_CHANNEL) |
1503 | { | 1515 | { |
1504 | key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); | 1516 | llOwnerSay(message); |
1505 | if (llGetLinkKey(LINK_ROOT) == root) | 1517 | // key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); |
1518 | // if (llGetLinkKey(LINK_ROOT) == root) | ||
1506 | { | 1519 | { |
1507 | integer f = llSubStringIndex(message, "permission denied. "); | 1520 | integer f = llSubStringIndex(message, "permission denied. "); |
1508 | if (-1 != f) | 1521 | if (-1 != f) |
@@ -1512,7 +1525,7 @@ d("lSCAN " + llDumpList2String(input, " ~ ")); | |||
1512 | if (("OSSL" == llList2String(e, 0)) && ("Runtime" == llList2String(e, 1)) && ("Error:" == llList2String(e, 2))) | 1525 | if (("OSSL" == llList2String(e, 0)) && ("Runtime" == llList2String(e, 1)) && ("Error:" == llList2String(e, 2))) |
1513 | function = llList2String(e, 3); | 1526 | function = llList2String(e, 3); |
1514 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, function, "0"); | 1527 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, function, "0"); |
1515 | llOwnerSay("Found naughty function " + function); | 1528 | llOwnerSay("Found naughty function " + function); |
1516 | return; | 1529 | return; |
1517 | } | 1530 | } |
1518 | } | 1531 | } |
@@ -722,8 +722,6 @@ s("YAY! Freeeeeee at last!!!!!"); | |||
722 | osMessageObject(LeashKey, "URL|" + data); | 722 | osMessageObject(LeashKey, "URL|" + data); |
723 | d("New URL " + URL); | 723 | d("New URL " + URL); |
724 | } | 724 | } |
725 | else if ("OHSILLYPROBE" == cmd) | ||
726 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, "OHSILLYPROBE", llGetKey()); | ||
727 | else if ("▲" == cmd) | 725 | else if ("▲" == cmd) |
728 | ; | 726 | ; |
729 | else if ((-1 == listFindString(Settings, fr + cmd, sSTRIDE)) && (-1 != set)) | 727 | else if ((-1 == listFindString(Settings, fr + cmd, sSTRIDE)) && (-1 != set)) |
diff --git a/OhSillyThreatDetector.lsl b/OhSillyThreatDetector.lsl index 24b3e43..2c808d2 100644 --- a/OhSillyThreatDetector.lsl +++ b/OhSillyThreatDetector.lsl | |||
@@ -9,7 +9,7 @@ | |||
9 | // Since it sniffs on DEBUG_CHANNEL messages, and a script can't hear any message sent by scripts in the same prim, | 9 | // Since it sniffs on DEBUG_CHANNEL messages, and a script can't hear any message sent by scripts in the same prim, |
10 | // you'll need to put this script in a prim without the naughty scripts you want to check. | 10 | // you'll need to put this script in a prim without the naughty scripts you want to check. |
11 | 11 | ||
12 | // Naturally it looks as if OpenSim has decided that scripts sniffing DEBUG_CHANNEL is a bad idee now. | 12 | // Naturally it looks as if OpenSim has decided that scripts sniffing DEBUG_CHANNEL is a bad idea now. |
13 | 13 | ||
14 | // Bits of this where taken from the script at the bottom of http://opensimulator.org/wiki/Threat_level | 14 | // Bits of this where taken from the script at the bottom of http://opensimulator.org/wiki/Threat_level |
15 | 15 | ||
@@ -23,32 +23,37 @@ integer WhichProbeFunction; // to tell us which function we're probing | |||
23 | // OpenSim lies. | 23 | // OpenSim lies. |
24 | list FunctionNames = | 24 | list FunctionNames = |
25 | [ | 25 | [ |
26 | // "osAvatarName2Key", // low (it fails anyway) | 26 | "osAvatarPlayAnimation", // very high |
27 | "osAvatarPlayAnimation", // very high | 27 | "osAvatarStopAnimation", // very high |
28 | "osAvatarStopAnimation", // very high | 28 | "osForceOtherSit", // very high |
29 | "osForceOtherSit", // very high | 29 | "osGetAvatarList", // none |
30 | // "osGetAgentIP", // severe | 30 | "osMakeNotecard", // high (describes what they where when making this decision) |
31 | // "osGetAgents", // none (it fails anyway) | 31 | "osGetNotecard", // very high (describes what they where when making this decision) |
32 | "osGetAvatarList", // none (it fails anyway) | 32 | "osGetNotecardLine", // very high (describes what they where when making this decision) |
33 | "osMakeNotecard", // high (describes what they where when making this decision) | 33 | "osGetNumberOfNotecardLines", // very high (describes what they where when making this decision) |
34 | "osGetNotecard", // very high (describes what they where when making this decision) | 34 | "osGetInventoryDesc", // - |
35 | "osGetInventoryDesc", // - | 35 | "osGetRegionSize", // - |
36 | "osGetNotecardLine", // very high (describes what they where when making this decision) | 36 | "osGetRezzingObject", // none |
37 | "osGetNumberOfNotecardLines", // very high | 37 | "osIsNpc", // - |
38 | "osGetRegionSize", // - (it fails anyway) | 38 | "osKey2Name", // low |
39 | "osGetRezzingObject", // none (it fails anyway) | 39 | "osMessageObject", // low |
40 | "osIsNpc", // - (it fails anyway) | 40 | "osNpcSit", // high |
41 | "osKey2Name", // low (it fails anyway) | 41 | "osSetSpeed", // moderate |
42 | "osMessageObject", // low (it fails anyway) | 42 | // "osSetOwnerSpeed", // moderate (not in 0.9.0.2) |
43 | "osNpcSit", // high | 43 | "osTeleportAgent", // severe |
44 | "osSetSpeed", // moderate | 44 | "osTeleportOwner" // none |
45 | "osTeleportAgent" // severe (it works anyway) | ||
46 | ]; | 45 | ]; |
47 | list FunctionPermitted = []; // 0 = not permitted, 1 = permitted | 46 | list FunctionPermitted = []; // 0 = not permitted, 1 = permitted |
48 | 47 | ||
49 | startProbe() | 48 | startProbe() |
50 | { | 49 | { |
51 | // llSay(0, "Probing OhSilly threat system to see what OpenSim script functions we are allowed use -"); | 50 | string root = llKey2Name(llList2Key(llGetObjectDetails(llGetKey(), [OBJECT_ROOT]), 0)); |
51 | |||
52 | llRegionSay(DEBUG_CHANNEL, "The '" + llGetObjectName() + "' prim in the object called '" + root + | ||
53 | "' belonging to '" + llKey2Name(llGetOwner()) + | ||
54 | "' might be about to spew OhSilly Threat Level system errors on the debug channel. " + | ||
55 | "Blame OpenSim developers for making this script jump through these hoops. Apologies. \n\n" + | ||
56 | "Probing OhSilly threat system to see what OpenSim script functions we are allowed use..."); | ||
52 | WhichProbeFunction = -1; | 57 | WhichProbeFunction = -1; |
53 | integer i = llGetListLength(FunctionNames); | 58 | integer i = llGetListLength(FunctionNames); |
54 | FunctionPermitted = []; | 59 | FunctionPermitted = []; |
@@ -73,7 +78,7 @@ default | |||
73 | 78 | ||
74 | listen(integer channel, string name, key id, string message) | 79 | listen(integer channel, string name, key id, string message) |
75 | { | 80 | { |
76 | key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); | 81 | // key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); |
77 | // name is the name of the prim, id is the UUID of the prim. | 82 | // name is the name of the prim, id is the UUID of the prim. |
78 | // Reports the name and UUID of the prim itself, not the object it's part of. | 83 | // Reports the name and UUID of the prim itself, not the object it's part of. |
79 | // Naturally can't detect debugs from our own prim, even if it's a different script. | 84 | // Naturally can't detect debugs from our own prim, even if it's a different script. |
@@ -96,9 +101,11 @@ From the source (NOTE: first version has no function name) - | |||
96 | ("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", function | 101 | ("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", function |
97 | ("{0} permission denied. Script permissions error.", function | 102 | ("{0} permission denied. Script permissions error.", function |
98 | 103 | ||
99 | OpenSim 0.9.1 seems to not even send it to the DEBUG_CHANNEL for scripts anymore. | 104 | OpenSim 0.9.1 sends to DEBUG_CHANNEL, but scripts can't read that. |
105 | osForceOtherSit permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.(script: OhSillyThreatDetector event: timer at <754.7451, 311.6997, 23.24454>) | ||
100 | */ | 106 | */ |
101 | if (llGetLinkKey(LINK_ROOT) == root) | 107 | //llOwnerSay(message); |
108 | // if (llGetLinkKey(LINK_ROOT) == root) | ||
102 | { | 109 | { |
103 | integer f = llSubStringIndex(message, "permission denied. "); | 110 | integer f = llSubStringIndex(message, "permission denied. "); |
104 | if (-1 != f) | 111 | if (-1 != f) |
@@ -108,7 +115,7 @@ OpenSim 0.9.1 seems to not even send it to the DEBUG_CHANNEL for scripts anymore | |||
108 | if (("OSSL" == llList2String(e, 0)) && ("Runtime" == llList2String(e, 1)) && ("Error:" == llList2String(e, 2))) | 115 | if (("OSSL" == llList2String(e, 0)) && ("Runtime" == llList2String(e, 1)) && ("Error:" == llList2String(e, 2))) |
109 | function = llList2String(e, 3); | 116 | function = llList2String(e, 3); |
110 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, function, "0"); | 117 | llMessageLinked(LINK_SET, DEBUG_CHANNEL, function, "0"); |
111 | llOwnerSay("Found naughty function " + function); | 118 | llOwnerSay("Found naughty function " + function); |
112 | llRegionSay(DEBUG_CHANNEL, "OPENSIM SUCKS!"); | 119 | llRegionSay(DEBUG_CHANNEL, "OPENSIM SUCKS!"); |
113 | } | 120 | } |
114 | } | 121 | } |
@@ -152,34 +159,28 @@ llOwnerSay("Found naughty function " + function); | |||
152 | t += llList2String(FunctionNames, i) + "() "; | 159 | t += llList2String(FunctionNames, i) + "() "; |
153 | } | 160 | } |
154 | // llSay(0, s); | 161 | // llSay(0, s); |
155 | llSay(0, t); | 162 | llOwnerSay(t); |
156 | return; | 163 | return; |
157 | } | 164 | } |
158 | // llOwnerSay("Checking OpenSim function " + name + "()"); // say status | 165 | // llOwnerSay("Checking OpenSim function " + name + "()"); // say status |
159 | if ("osAvatarName2Key" == name) | 166 | if ("osAvatarPlayAnimation" == name) |
160 | osAvatarName2Key("John", "Smith"); | ||
161 | else if ("osAvatarPlayAnimation" == name) | ||
162 | osAvatarPlayAnimation(BogusKey, BogusKey); | 167 | osAvatarPlayAnimation(BogusKey, BogusKey); |
163 | else if ("osAvatarStopAnimation" == name) | 168 | else if ("osAvatarStopAnimation" == name) |
164 | osAvatarStopAnimation(BogusKey, BogusKey); | 169 | osAvatarStopAnimation(BogusKey, BogusKey); |
165 | else if ("osForceOtherSit" == name) | 170 | else if ("osForceOtherSit" == name) |
166 | osForceOtherSit(BogusKey, llGetKey()); | 171 | osForceOtherSit(BogusKey, llGetKey()); |
167 | else if ("osGetAgentIP" == name) | ||
168 | osGetAgentIP(BogusKey); | ||
169 | else if ("osGetAgents" == name) | ||
170 | osGetAgents(); | ||
171 | else if ("osGetAvatarList" == name) | 172 | else if ("osGetAvatarList" == name) |
172 | osGetAvatarList(); | 173 | osGetAvatarList(); |
173 | else if ("osMakeNotecard" == name) // Out of order, so the others have something to read. | 174 | else if ("osMakeNotecard" == name) // Out of order, so the others have something to read. |
174 | osMakeNotecard("OhSillyThreatCard", [""]); | 175 | osMakeNotecard("OhSillyThreatCard", [""]); |
175 | else if ("osGetNotecard" == name) | 176 | else if ("osGetNotecard" == name) |
176 | osGetNotecard("OhSillyThreatCard"); | 177 | osGetNotecard("OhSillyThreatCard"); |
177 | else if ("osGetInventoryDesc" == name) | ||
178 | osGetInventoryDesc("inventory"); | ||
179 | else if ("osGetNotecardLine" == name) | 178 | else if ("osGetNotecardLine" == name) |
180 | osGetNotecardLine("OhSillyThreatCard", 0); | 179 | osGetNotecardLine("OhSillyThreatCard", 0); |
181 | else if ("osGetNumberOfNotecardLines" == name) | 180 | else if ("osGetNumberOfNotecardLines" == name) |
182 | osGetNumberOfNotecardLines("OhSillyThreatCard"); | 181 | osGetNumberOfNotecardLines("OhSillyThreatCard"); |
182 | else if ("osGetInventoryDesc" == name) | ||
183 | osGetInventoryDesc("inventory"); | ||
183 | else if ("osGetRegionSize" == name) | 184 | else if ("osGetRegionSize" == name) |
184 | osGetRegionSize(); | 185 | osGetRegionSize(); |
185 | else if ("osGetRezzingObject" == name) | 186 | else if ("osGetRezzingObject" == name) |
@@ -187,15 +188,19 @@ llOwnerSay("Found naughty function " + function); | |||
187 | else if ("osIsNpc" == name) | 188 | else if ("osIsNpc" == name) |
188 | osIsNpc(BogusKey); | 189 | osIsNpc(BogusKey); |
189 | else if ("osKey2Name" == name) | 190 | else if ("osKey2Name" == name) |
190 | osKey2Name(BogusKey); | 191 | osKey2Name(llGetOwner()); |
191 | else if ("osMessageObject" == name) | 192 | else if ("osMessageObject" == name) |
192 | osMessageObject(llGetKey(), "G'day."); | 193 | osMessageObject(llGetKey(), "G'day."); |
193 | else if ("osNpcSit" == name) | 194 | else if ("osNpcSit" == name) |
194 | osNpcSit(BogusKey, llGetKey(), 0); | 195 | osNpcSit(BogusKey, llGetKey(), 0); |
195 | else if ("osSetSpeed" == name) | 196 | else if ("osSetSpeed" == name) |
196 | osSetSpeed(BogusKey, 1.0); | 197 | osSetSpeed(BogusKey, 1.0); |
198 | // else if ("osSetOwnerSpeed" == name) | ||
199 | // osSetOwnerSpeed(1.0); | ||
197 | else if ("osTeleportAgent" == name) | 200 | else if ("osTeleportAgent" == name) |
198 | osTeleportAgent(BogusKey, ZERO_VECTOR, ZERO_VECTOR); | 201 | osTeleportAgent(BogusKey, ZERO_VECTOR, ZERO_VECTOR); |
202 | else if ("osTeleportAgent" == name) | ||
203 | osTeleportOwner(ZERO_VECTOR, ZERO_VECTOR); | ||
199 | 204 | ||
200 | // If we got here, then the timer() handler didn't crash, which means the function it checked for | 205 | // If we got here, then the timer() handler didn't crash, which means the function it checked for |
201 | // was actually permitted. So we update the list to indicate that we can use that particular function. | 206 | // was actually permitted. So we update the list to indicate that we can use that particular function. |
diff --git a/~1ring.command.data.txt b/~1ring.command.data.txt index ffd190e..dee2639 100644 --- a/~1ring.command.data.txt +++ b/~1ring.command.data.txt | |||
@@ -130,6 +130,6 @@ w | |||
130 | 1ring.MENU | 130 | 1ring.MENU |
131 | 131 | ||
132 | 31 | 132 | 31 |
133 | 1ring.OHSILLYPROBE | 133 | 1ring.NOP |
134 | 134 | ||
135 | 31 \ No newline at end of file | 135 | 31 \ No newline at end of file |