From 37895e05ad1e32085f41122b252e5a9f2f5238b3 Mon Sep 17 00:00:00 2001 From: zontreck Date: Fri, 4 Oct 2024 21:46:50 -0700 Subject: [PATCH] feat(settings.lsl): add delete API opcode Signed-off-by: zontreck --- src/includes/Variables.lsl | 3 ++- src/raw/settings.lsl | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/includes/Variables.lsl b/src/includes/Variables.lsl index f463022..dcf7f28 100644 --- a/src/includes/Variables.lsl +++ b/src/includes/Variables.lsl @@ -4,4 +4,5 @@ string OP_SETTINGS_WRITE = "settings_write"; string OP_SETTINGS_READ = "settings_read"; string OP_SETTINGS_REQUEST = "settings_req"; string OP_SETTINGS_RESPONSE = "settings_resp"; -string OP_SETTINGS_RESPONSE = "settings_empty"; \ No newline at end of file +string OP_SETTINGS_RESPONSE = "settings_empty"; +string OP_SETTINGS_DELETE = "settings_del"; \ No newline at end of file diff --git a/src/raw/settings.lsl b/src/raw/settings.lsl index e3158b7..c0ea3b8 100644 --- a/src/raw/settings.lsl +++ b/src/raw/settings.lsl @@ -11,6 +11,9 @@ default WriteSetting(llJsonGetValue(sMsg, ["key"]), llJsonGetValue(sMsg, ["value"])); } else if(llJsonGetValue(sMsg, ["op"]) == OP_SETTINGS_READ) { ReadSetting(llJsonGetValue(sMsg, ["key"])); + } else if(llJsonGetValue(sMsg, ["op"]) == OP_SETTINGS_DELETE) { + llLinksetDataDelete(llJsonGetValue(sMsg, ["key"])); + NoSetting(llJsonGetValue(sMsg, ["key"])); } } }