From 81c77fb62209fff2bcce14e7d9740a5bd86fa381 Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 6 Sep 2021 21:23:33 +1000 Subject: Rejig how OhSilly detection works. --- 1chatter.lsl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to '1chatter.lsl') diff --git a/1chatter.lsl b/1chatter.lsl index b41df53..3c89a6f 100644 --- a/1chatter.lsl +++ b/1chatter.lsl @@ -11,6 +11,7 @@ key ScriptKey; key LibraryKey; key Owner; string URL; +key grid; list Commands; integer cNAME = 0; @@ -1106,6 +1107,8 @@ integer doThing(key id, string command, string fr, string cmd, string data, inte dt = llListReplaceList(dt, [], 0, 0); addEvent(time, fr + llDumpList2String(dt, " "), id); } + else if ("OHSILLYPROBE" == cmd) + llMessageLinked(LINK_SET, DEBUG_CHANNEL, "OHSILLYPROBE", llGetKey()); else { sendScript(them, lCMD, fr, [source, id, command, cmd, data]); @@ -1276,6 +1279,7 @@ init() VelTime = llGetTimeOfDay(); VelPos = llGetPos(); addEvent(300, "Musers", ScriptKey); + addEvent(30, "*.OHSILLYPROBE", ScriptKey); URLrequestID = llRequestURL(); } @@ -1288,6 +1292,7 @@ default d("\n\n1chatter resetting client scripts @ " + (string) Start + "\n"); ScriptName = llGetScriptName(); ScriptKey = llGetInventoryKey(ScriptName); LibraryKey = ScriptKey; + grid = osGetGridName(); init(); } @@ -1305,6 +1310,13 @@ d("\n\n1chatter resetting client scripts @ " + (string) Start + "\n"); llResetScript(); if (change & CHANGED_REGION) { + string newGrid = osGetGridName(); + + if (newGrid != grid) + { + grid = newGrid; + addEvent(30, "*.OHSILLYPROBE", ScriptKey); + } llReleaseURL(URL); URL = ""; URLrequestID = llRequestURL(); @@ -1501,8 +1513,9 @@ d("lSCAN " + llDumpList2String(input, " ~ ")); // Catch OhSillyThreatLevel messages, from the probe. if (channel == DEBUG_CHANNEL) { - key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); - if (llGetLinkKey(LINK_ROOT) == root) +llOwnerSay(message); +// key root = llList2Key(llGetObjectDetails(id, [OBJECT_ROOT]), 0); +// if (llGetLinkKey(LINK_ROOT) == root) { integer f = llSubStringIndex(message, "permission denied. "); if (-1 != f) @@ -1512,7 +1525,7 @@ d("lSCAN " + llDumpList2String(input, " ~ ")); if (("OSSL" == llList2String(e, 0)) && ("Runtime" == llList2String(e, 1)) && ("Error:" == llList2String(e, 2))) function = llList2String(e, 3); llMessageLinked(LINK_SET, DEBUG_CHANNEL, function, "0"); -llOwnerSay("Found naughty function " + function); + llOwnerSay("Found naughty function " + function); return; } } -- cgit v1.1