From 3f174bb13baa7577cf12245e5a963c28eb45457d Mon Sep 17 00:00:00 2001 From: zontreck Date: Sun, 28 Feb 2021 19:02:26 -0700 Subject: [PATCH] Release 8.0.3 >Fix a minor bug reported over discord by Anne Bloodrose where the animations menu and related chat command could not be used by public users if public is enabled. --- src/Apps/oc_detach.lsl | 41 ++++++++-------- src/collar/oc_anim.lsl | 106 ++++++++++++++++++++--------------------- web/version.txt | 2 +- 3 files changed, 74 insertions(+), 75 deletions(-) diff --git a/src/Apps/oc_detach.lsl b/src/Apps/oc_detach.lsl index 90caebbea..16f8080bb 100644 --- a/src/Apps/oc_detach.lsl +++ b/src/Apps/oc_detach.lsl @@ -1,7 +1,7 @@ /* This file is a part of OpenCollar. -Copyright ©2020 +Copyright ©2021 : Contributors : @@ -32,15 +32,15 @@ string Checkbox(integer iValue, string sLabel) { //MESSAGE MAP //integer CMD_ZERO = 0; integer CMD_OWNER = 500; -//integer CMD_TRUSTED = 501; -//integer CMD_GROUP = 502; +integer CMD_TRUSTED = 501; +integer CMD_GROUP = 502; integer CMD_WEARER = 503; -//integer CMD_EVERYONE = 504; -//integer CMD_RLV_RELAY = 507; -//integer CMD_SAFEWORD = 510; -//integer CMD_RELAY_SAFEWORD = 511; +integer CMD_EVERYONE = 504; +integer CMD_RLV_RELAY = 507; +integer CMD_SAFEWORD = 510; +integer CMD_RELAY_SAFEWORD = 511; -//integer NOTIFY = 1002; +integer NOTIFY = 1002; integer REBOOT = -1000; //integer LM_SETTING_SAVE = 2000;//scripts send messages on this channel to have settings saved @@ -52,19 +52,19 @@ integer REBOOT = -1000; integer MENUNAME_REQUEST = 3000; integer MENUNAME_RESPONSE = 3001; -//integer MENUNAME_REMOVE = 3003; +integer MENUNAME_REMOVE = 3003; -//integer RLV_CMD = 6000; -//integer RLV_REFRESH = 6001;//RLV plugins should reinstate their restrictions upon receiving this message. +integer RLV_CMD = 6000; +integer RLV_REFRESH = 6001;//RLV plugins should reinstate their restrictions upon receiving this message. -//integer RLV_OFF = 6100; // send to inform plugins that RLV is disabled now, no message or key needed -//integer RLV_ON = 6101; // send to inform plugins that RLV is enabled now, no message or key needed +integer RLV_OFF = 6100; // send to inform plugins that RLV is disabled now, no message or key needed +integer RLV_ON = 6101; // send to inform plugins that RLV is enabled now, no message or key needed integer DIALOG = -9000; integer DIALOG_RESPONSE = -9001; integer DIALOG_TIMEOUT = -9002; string UPMENU = "BACK"; -//string ALL = "ALL"; +string ALL = "ALL"; Dialog(key kID, string sPrompt, list lChoices, list lUtilityButtons, integer iPage, integer iAuth, string sName) { key kMenuID = llGenerateKey(); @@ -84,16 +84,15 @@ Menu(key kID, integer iAuth) { } UserCommand(integer iNum, string sStr, key kID) { - if (iNumCMD_WEARER) return; if (llSubStringIndex(sStr,llToLower(g_sSubMenu)) && sStr != "menu "+g_sSubMenu) return; if (sStr==g_sSubMenu || sStr == "menu "+g_sSubMenu) Menu(kID, iNum); //else if (iNum!=CMD_OWNER && iNum!=CMD_TRUSTED && kID!=g_kWearer) RelayNotify(kID,"Access denied!",0); else { - //integer iWSuccess = 0; - //string sChangetype = llList2String(llParseString2List(sStr, [" "], []),0); - //string sChangevalue = llList2String(llParseString2List(sStr, [" "], []),1); - //string sText; + integer iWSuccess = 0; + string sChangetype = llList2String(llParseString2List(sStr, [" "], []),0); + string sChangevalue = llList2String(llParseString2List(sStr, [" "], []),1); + string sText; } } @@ -101,7 +100,7 @@ UserCommand(integer iNum, string sStr, key kID) { key g_kWearer; list g_lMenuIDs; integer g_iMenuStride; -//integer g_iLocked=FALSE; +integer g_iLocked=FALSE; integer ALIVE = -55; integer READY = -56; integer STARTUP = -57; @@ -143,7 +142,7 @@ state active } */ link_message(integer iSender,integer iNum,string sStr,key kID){ - if(iNum >= CMD_OWNER && iNum <= CMD_WEARER) UserCommand(iNum, sStr, kID); + if(iNum >= CMD_OWNER && iNum <= CMD_EVERYONE) UserCommand(iNum, sStr, kID); else if(iNum == MENUNAME_REQUEST && sStr == g_sParentMenu) llMessageLinked(iSender, MENUNAME_RESPONSE, g_sParentMenu+"|"+ g_sSubMenu,""); else if(iNum == DIALOG_RESPONSE){ diff --git a/src/collar/oc_anim.lsl b/src/collar/oc_anim.lsl index 75057d024..2fd1b1a03 100644 --- a/src/collar/oc_anim.lsl +++ b/src/collar/oc_anim.lsl @@ -1,12 +1,13 @@ /* This file is a part of OpenCollar. -Copyright 2019 +Copyright 2021 : Contributors : Aria (Tashia Redrose) * July 2020 - Rewrote oc_anim * Dec 2020 - Fix bug where animations were not treated case insensitive, and where animations with a space in the name could not be played by chat command or menu button + * Feb 2021 - Fix Public Access Felkami (Caraway Ohmai) * Dec 2020 - Fixed #456, #462, #461, added LockMeister AO suppress @@ -155,7 +156,6 @@ list GetPoseList(integer iType) UserCommand(integer iNum, string sStr, key kID) { string ssStr = llToLower(sStr); - if (iNumCMD_WEARER) return; if (iNum == CMD_OWNER && ssStr == "runaway") { g_lOwner = g_lTrust = g_lBlock = []; return; @@ -206,57 +206,60 @@ UserCommand(integer iNum, string sStr, key kID) { llMessageLinked(LINK_SET, LM_SETTING_DELETE, "anim_pose",""); iRespringPoses=TRUE; } else if(sChangetype == UP_ARROW || sChangetype == "up" || sChangetype == DOWN_ARROW || sChangetype == "down"){ - // adjust current pose - //llOwnerSay(" up or down"); - //sChangevalue="remenu"; - integer iUp= FALSE; - iRespringPoses=TRUE; - if(sChangetype == UP_ARROW || sChangetype == "up")iUp=TRUE; - if(g_lCurrentAnimations == []){ - // adjust standing - //llOwnerSay("up: "+(string)iUp+"; anims list blank"); - if(iUp)g_fStandHover += g_fAdjustment; - else g_fStandHover-=g_fAdjustment; - if(g_fStandHover==0)llMessageLinked(LINK_SET,LM_SETTING_DELETE,"offset_standhover",""); - else llMessageLinked(LINK_SET, LM_SETTING_SAVE, "offset_standhover="+(string)g_fStandHover,""); - llMessageLinked(LINK_SET, NOTIFY, "0The hover height for 'Standing' is now "+(string)g_fStandHover, g_kWearer); - } else { - integer iPos=llListFindList(g_lAdjustments,llList2List(g_lCurrentAnimations, 0, 0)); - if(iPos==-1){ - // llOwnerSay("up:"+(string)iUp+"; anim not found in adjustments"); - // OK now we make a new entry - - if(iUp) - g_lAdjustments+=[llList2String(g_lCurrentAnimations, 0), g_fAdjustment]; - else - g_lAdjustments+=[llList2String(g_lCurrentAnimations, 0),-g_fAdjustment]; - - - llMessageLinked(LINK_SET, NOTIFY, "0The hover height for '"+llList2String(g_lCurrentAnimations, 0)+"' is now "+(string)g_fAdjustment, g_kWearer); + // only owner or wearer + if(iNum == CMD_OWNER || iNum == CMD_WEARER){ + // adjust current pose + //llOwnerSay(" up or down"); + //sChangevalue="remenu"; + integer iUp= FALSE; + iRespringPoses=TRUE; + if(sChangetype == UP_ARROW || sChangetype == "up")iUp=TRUE; + if(g_lCurrentAnimations == []){ + // adjust standing + //llOwnerSay("up: "+(string)iUp+"; anims list blank"); + if(iUp)g_fStandHover += g_fAdjustment; + else g_fStandHover-=g_fAdjustment; + if(g_fStandHover==0)llMessageLinked(LINK_SET,LM_SETTING_DELETE,"offset_standhover",""); + else llMessageLinked(LINK_SET, LM_SETTING_SAVE, "offset_standhover="+(string)g_fStandHover,""); + llMessageLinked(LINK_SET, NOTIFY, "0The hover height for 'Standing' is now "+(string)g_fStandHover, g_kWearer); } else { + integer iPos=llListFindList(g_lAdjustments,llList2List(g_lCurrentAnimations, 0, 0)); + if(iPos==-1){ + // llOwnerSay("up:"+(string)iUp+"; anim not found in adjustments"); + // OK now we make a new entry + + if(iUp) + g_lAdjustments+=[llList2String(g_lCurrentAnimations, 0), g_fAdjustment]; + else + g_lAdjustments+=[llList2String(g_lCurrentAnimations, 0),-g_fAdjustment]; + + + llMessageLinked(LINK_SET, NOTIFY, "0The hover height for '"+llList2String(g_lCurrentAnimations, 0)+"' is now "+(string)g_fAdjustment, g_kWearer); + } else { + + //llOwnerSay("up:"+(string)iUp+"; anim update"); + float fCurrent = (float)llList2String(g_lAdjustments, iPos+1); + if(iUp) + fCurrent+=g_fAdjustment; + else + fCurrent -= g_fAdjustment; + + + llMessageLinked(LINK_SET, NOTIFY, "0The hover height for '"+llList2String(g_lCurrentAnimations, 0)+"' is now "+(string)fCurrent, g_kWearer); + if(fCurrent!=0) + g_lAdjustments = llListReplaceList(g_lAdjustments, [fCurrent],iPos+1,iPos+1); + else + g_lAdjustments = llDeleteSubList(g_lAdjustments,iPos,iPos+1); + } + llMessageLinked(LINK_SET, LM_SETTING_SAVE, "offset_hovers="+llDumpList2String(g_lAdjustments,","),""); - //llOwnerSay("up:"+(string)iUp+"; anim update"); - float fCurrent = (float)llList2String(g_lAdjustments, iPos+1); - if(iUp) - fCurrent+=g_fAdjustment; - else - fCurrent -= g_fAdjustment; + //llOwnerSay("up:"+(string)iUp+"; saved hover list"); + if(llGetListLength(g_lCurrentAnimations)!=0) + PlayAnimation(); - llMessageLinked(LINK_SET, NOTIFY, "0The hover height for '"+llList2String(g_lCurrentAnimations, 0)+"' is now "+(string)fCurrent, g_kWearer); - if(fCurrent!=0) - g_lAdjustments = llListReplaceList(g_lAdjustments, [fCurrent],iPos+1,iPos+1); - else - g_lAdjustments = llDeleteSubList(g_lAdjustments,iPos,iPos+1); } - llMessageLinked(LINK_SET, LM_SETTING_SAVE, "offset_hovers="+llDumpList2String(g_lAdjustments,","),""); - - //llOwnerSay("up:"+(string)iUp+"; saved hover list"); - if(llGetListLength(g_lCurrentAnimations)!=0) - PlayAnimation(); - - - } + }else llMessageLinked(LINK_SET, NOTIFY, "%NOACCESS% to changing height", kID); } else if(sChangetype == "animlock"){ string text; if(iNum == CMD_OWNER){ @@ -516,11 +519,8 @@ state active } link_message(integer iSender,integer iNum,string sStr,key kID){ - if(iNum >= CMD_OWNER && iNum <= CMD_WEARER) UserCommand(iNum, sStr, kID); - else if(iNum == CMD_EVERYONE && (llToLower(sStr)==llToLower(g_sSubMenu) || llToLower(sStr) == "menu "+llToLower(g_sSubMenu)) ){ - //Test if this is a denied auth - llMessageLinked(LINK_SET,NOTIFY,"0%NOACCESS% to animations.", kID); - }else if(iNum == MENUNAME_REQUEST && sStr == g_sParentMenu){ + if(iNum >= CMD_OWNER && iNum <= CMD_EVERYONE) UserCommand(iNum, sStr, kID); + else if(iNum == MENUNAME_REQUEST && sStr == g_sParentMenu){ llMessageLinked(LINK_SET, MENUNAME_RESPONSE, g_sParentMenu+"|"+ g_sSubMenu,""); llMessageLinked(LINK_SET, MENUNAME_REQUEST, g_sSubMenu, ""); }else if(iNum == MENUNAME_RESPONSE){ diff --git a/web/version.txt b/web/version.txt index e9090272d..5d94b4090 100644 --- a/web/version.txt +++ b/web/version.txt @@ -1 +1 @@ -8.0.2000 \ No newline at end of file +8.0.3000 \ No newline at end of file