Skip to content

Commit

Permalink
Merge pull request #1004 from NikkiLacrima/NikkiLacrima-patch-oc_spy
Browse files Browse the repository at this point in the history
Nikki lacrima patch oc spy
  • Loading branch information
NikkiLacrima authored Nov 8, 2023
2 parents 05c3518 + 3c1ef20 commit 99905f0
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions src/Apps/oc_spy.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -229,15 +231,6 @@ SaveSettings() {
UserCommand(integer iNum, string sStr, key kID) {
if (iNum<CMD_OWNER || iNum>CMD_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....
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 99905f0

Please sign in to comment.