Adds discord relay plugin
This commit is contained in:
parent
6ad891e5ac
commit
5674233bf8
5 changed files with 65 additions and 46 deletions
28
LSL/raw/plugin_discord.lsl
Normal file
28
LSL/raw/plugin_discord.lsl
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
Discord Relay Plugin
|
||||
*/
|
||||
|
||||
#include "Common.lsl"
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llListen(0x9CB9, "", "", "");
|
||||
}
|
||||
|
||||
listen(integer c,string n,key i, string m) {
|
||||
if(llGetOwnerKey(i) == llGetOwner()) {
|
||||
llMessageLinked(LINK_SET, 888, llList2Json(JSON_OBJECT, [
|
||||
"system", FALSE,
|
||||
"message", llList2Json(JSON_OBJECT, [
|
||||
"username", llJsonGetValue(m, ["user"]),
|
||||
"content", llJsonGetValue(m, ["msg"]),
|
||||
"color", 2067276,
|
||||
"author", llJsonGetValue(m, ["author"]),
|
||||
"title", llJsonGetValue(m,["title"])
|
||||
])
|
||||
]), NULL_KEY);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue