Broadcast all commands, even internal ones

This makes it possible to create hook scripts that will execute on
connect, disconnect, etc.
This commit is contained in:
Bridget
2020-04-13 17:23:01 +02:00
parent 95530fd468
commit 16e481ad54
2 changed files with 3 additions and 6 deletions

View File

@@ -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
{

View File

@@ -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");
}