Skip to content

Commit

Permalink
Update oc_core.lsl
Browse files Browse the repository at this point in the history
  • Loading branch information
Medea-Destiny authored Nov 28, 2023
1 parent 759d43a commit d3588d6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/collar/oc_core.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ integer g_iVerbosityLevel=1;
integer g_iNotifyInfo=FALSE;

string g_sSafeword="RED";
integer g_iSafewordDisable=0;
//MESSAGE MAP
//integer CMD_ZERO = 0;
integer CMD_OWNER = 500;
Expand Down Expand Up @@ -257,7 +258,7 @@ UserCommand(integer iNum, string sStr, key kID) {
} else llMessageLinked(LINK_SET, NOTIFY, "0%NOACCESS% to update the collar", kID);
} else if(sChangetype == "safeword") {
if(iNum!=CMD_OWNER && kID!=g_kWearer) {
llMessageLinked(LINK_SET,NOTIFY,"No access to safeword!",kID);
llMessageLinked(LINK_SET,NOTIFY,"0No access to safeword!",kID);
return;
} if(llToLower(sChangevalue) == "off") {
if(iNum==CMD_OWNER) {
Expand All @@ -266,6 +267,10 @@ UserCommand(integer iNum, string sStr, key kID) {
} else llOwnerSay("Only an owner can disable Safeword!");
return;
} else if(sChangevalue!="") {
if(g_iSafewordDisable==TRUE && iNum!=CMD_OWNER) {
llMessageLinked(LINK_SET,NOTIFY,"0Only Owners can set a safeword when disabled!",kID);
return;
}
if(sChangevalue == "RED") llMessageLinked(LINK_SET, LM_SETTING_DELETE, "global_safeword","");
else llMessageLinked(LINK_SET, LM_SETTING_SAVE, "global_safeword="+sChangevalue,"");
llMessageLinked(LINK_SET,NOTIFY,"1Safeword is now set to '"+sChangevalue+"'.",kID);
Expand Down Expand Up @@ -723,6 +728,8 @@ state active
}
} else if(sVar == "safeword"){
g_sSafeword = sVal;
} else if(sVar == "safeworddisable"){
g_iSafewordDisable=1;
} else if(sVar == "prefix"){
g_sPrefix = sVal;
} else if(sVar == "channel"){
Expand Down Expand Up @@ -792,7 +799,9 @@ state active
g_iLocked=FALSE;
llOwnerSay("@detach=y");
}
else if(sVar == "safeword"){
else if(sVar == "safeworddisable"){
g_iSafewordDisable=0;
} else if(sVar == "safeword"){
g_sSafeword = "RED";
llMessageLinked(LINK_SET, CMD_OWNER, "safeword-enable","");
} else if(sVar == "prefix"){
Expand Down

0 comments on commit d3588d6

Please sign in to comment.