Files
lsl-shell/modules/echo.lsl

24 lines
641 B
Plaintext
Raw Normal View History

2020-04-13 20:12:23 +02:00
string COMMAND = "echo";
string USAGE = "usage: echo [arg ...]
Repeat the given arguments.";
2020-04-13 01:43:13 +02:00
default
{
link_message(integer sender, integer num, string msg, key id)
{
list params = llParseString2List(msg, [" "], [""]);
string param0 = llList2String(params, 0);
if(id == "get_commands")
2020-04-13 01:43:13 +02:00
{
2020-04-13 20:12:23 +02:00
llMessageLinked(LINK_SET, 0, COMMAND + "|" + USAGE, "command_info");
2020-04-13 01:43:13 +02:00
}
else if(param0 == "echo")
{
string response = llDumpList2String(llDeleteSubList(params, 0, 0), " ");
llMessageLinked(LINK_SET, 1, response, id);
}
}
}