Files
lsl-shell/modules/echo.lsl
2020-04-13 20:14:20 +02:00

24 lines
641 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, 0, COMMAND + "|" + USAGE, "command_info");
}
else if(param0 == "echo")
{
string response = llDumpList2String(llDeleteSubList(params, 0, 0), " ");
llMessageLinked(LINK_SET, 1, response, id);
}
}
}