From 16e481ad54f2f93e60935bb3d27d7886eb36bb26 Mon Sep 17 00:00:00 2001 From: Bridget Date: Mon, 13 Apr 2020 17:23:01 +0200 Subject: [PATCH] Broadcast all commands, even internal ones This makes it possible to create hook scripts that will execute on connect, disconnect, etc. --- endpoint.lsl | 7 ++----- modules/echo.lsl | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/endpoint.lsl b/endpoint.lsl index a96d95e..c688608 100644 --- a/endpoint.lsl +++ b/endpoint.lsl @@ -20,7 +20,7 @@ default state_entry() { llRequestSecureURL(); - llMessageLinked(LINK_SET, 0, "", "request_command_info"); + llMessageLinked(LINK_SET, 0, "", "get_commands"); } link_message(integer link, integer num, string msg, key id) @@ -77,10 +77,7 @@ default respond(id, 200, "available_commands", llList2Json(JSON_OBJECT, \ commands)); } - else - { - broadcast_command(id, command); - } + broadcast_command(id, command); } else { diff --git a/modules/echo.lsl b/modules/echo.lsl index 08f9950..563f92e 100644 --- a/modules/echo.lsl +++ b/modules/echo.lsl @@ -6,7 +6,7 @@ default string param0 = llList2String(params, 0); string param1 = llList2String(params, 1); - if(id == "request_command_info") + if(id == "get_commands") { llMessageLinked(LINK_SET, 0, "echo|echo: echo [arg ...]", "command_info"); }