From 3c1ef202d0258008b5e7b5eedbdcf233120fc593 Mon Sep 17 00:00:00 2001 From: NikkiLacrima <111503035+NikkiLacrima@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:32:09 +0100 Subject: [PATCH] Check for empty owners list in oc_spy.lsl --- src/Apps/oc_spy.lsl | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Apps/oc_spy.lsl b/src/Apps/oc_spy.lsl index 3a33d420c..936faf835 100644 --- a/src/Apps/oc_spy.lsl +++ b/src/Apps/oc_spy.lsl @@ -4,6 +4,8 @@ This file is a part of OpenCollar. Copyright 2020 : Contributors : +Nikki Lacrima (Nov 2023) + - Check for empty owner list, replaces faulty "runaway" check. Aria (tiff589/Tashia Redrose) - (Feb 2020) - Misc fixes - Updated checkboxes to use the checkbox function, which made checking in the dialog_response section easier as well. @@ -229,15 +231,6 @@ SaveSettings() { UserCommand(integer iNum, string sStr, key kID) { if (iNumCMD_WEARER) return; if (llSubStringIndex(sStr,llToLower(g_sSubMenu)) && sStr != "menu "+g_sSubMenu) return; - if ((iNum == CMD_OWNER || iNum == CMD_WEARER )&& sStr == "runaway") { - g_lOwner = []; - llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_subchat",""); - llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_attchat",""); - llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_radar",""); - llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_trace",""); - g_itrace = g_iradar = g_isubchat = g_iattchat = FALSE; - return; - } if (sStr==g_sSubMenu || sStr == "menu "+g_sSubMenu) { Menu(kID, iNum); } else if (iNum!=CMD_OWNER || kID==g_kWearer) { // If it's the wearer or not an owner.... @@ -534,6 +527,13 @@ default } else if(llList2String(lSettings,0)=="auth"){ if(llList2String(lSettings,1)=="owner") { g_lOwner = llParseString2List(llList2String(lSettings,2), [","], []); + if (g_lOwner == []) { + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_subchat",""); + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_attchat",""); + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_radar",""); + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_trace",""); + g_itrace = g_iradar = g_isubchat = g_iattchat = FALSE; + } } } } else if(iNum == LM_SETTING_DELETE) { @@ -546,6 +546,14 @@ default else if(llList2String(lSettings,1)=="attchat") g_iattchat=FALSE; else if(llList2String(lSettings,1)=="radar") g_iradar=FALSE; else if(llList2String(lSettings,1)=="trace") g_itrace=FALSE; + } else if (sStr == "auth_owner") { + g_lOwner = []; + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_subchat",""); + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_attchat",""); + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_radar",""); + llMessageLinked(LINK_SET, LM_SETTING_DELETE, "spy_trace",""); + g_itrace = g_iradar = g_isubchat = g_iattchat = FALSE; + return; } } else if(iNum == LINK_CMD_DEBUG) { integer onlyver =0;