Welcome Guest Search | Active Topics | Log In | Register

Strip | characters from LSL api SAY command
missyrestless Offline
#1 Posted : 28 January 2012 00:18:18(UTC)


Rank: METAbolter

Joined: 27/12/2010(UTC)
Posts: 36
Location: Santa Cruz, California

Thanks: 0 times
Was thanked: 4 time(s) in 4 post(s)
Since the "|" character is used to delimit components of the LSL API commands I decided it would be a good idea to strip any "|" characters out of the message sent to an LSL API SAY command. Here's a code snippet to give you an idea of how I did this:
Code:
if (use_lsl_say) {
    // Replace | characters with _ before sending command
    llInstantMessage(avatar, commandID + "|" + MD5edpassword + "|SAY|0|" +
        llDumpList2String(llParseStringKeepNulls(my_msg, ["|"], []), "_") + "|normal");
}
else
    llSay(0, my_msg);
Sponsor  
 
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.