This currently uses the following mapping: -1 : internal; for retrieving command info, sending commands, etc. 0 : success 1 : error
26 lines
630 B
Plaintext
26 lines
630 B
Plaintext
string COMMAND = "echo";
|
|
string USAGE = \
|
|
"usage: echo [arg ...]
|
|
|
|
Repeat the given arguments.
|
|
";
|
|
|
|
default
|
|
{
|
|
link_message(integer sender, integer num, string msg, key id)
|
|
{
|
|
list params = llParseString2List(msg, [" "], [""]);
|
|
string param0 = llList2String(params, 0);
|
|
|
|
if(id == "get_commands")
|
|
{
|
|
llMessageLinked(LINK_SET, -1, COMMAND + "|" + USAGE, "command_info");
|
|
}
|
|
else if(param0 == COMMAND)
|
|
{
|
|
string response = llDumpList2String(llDeleteSubList(params, 0, 0), " ");
|
|
llMessageLinked(LINK_SET, 0, response, id);
|
|
}
|
|
}
|
|
}
|