From 5605ec73fb4793578118a1189521a5c79deae0db Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 6 Sep 2021 21:41:57 +1000 Subject: Make the emoter work. --- 1ring.lsl | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/1ring.lsl b/1ring.lsl index 4665403..43a1e4a 100644 --- a/1ring.lsl +++ b/1ring.lsl @@ -1484,26 +1484,22 @@ d("HEY leashy! " + URL); } } - list result = nextWord(" ", message, ""); if (channel == meChannel) { - list names = nextWord(" ", llKey2Name(llGetOwner()), ""); + string n = llKey2Name(Owner); + integer i = llSubStringIndex(n, " "); - if (llGetSubString(message, 0, 0) == "'") - { - list suffix = nextWord(" ", message, ""); - names = ["", llList2String(names, 1) + llList2String(suffix, 1)]; - message = llList2String(suffix, 0); - } // Rename ourselves to the first word of owners name. - llSetObjectName(llList2String(names, 1)); + llSetObjectName(llGetSubString(n, 0, i - 1)); llSay(0, "/me " + message); } else if (channel == bareChannel) { + integer i = llSubStringIndex(message, " "); + // Rename ourselves to the first word. - llSetObjectName(llList2String(result, 1)); - llSay(0, "/me " + llList2String(result, 0)); + llSetObjectName(llGetSubString(message, 0, i - 1)); + llSay(0, llGetSubString(message, i + 1, -1)); } // Change our name back llSetObjectName(OurName); -- cgit v1.1