Jump to content
Xander Lopez

identifying llRegionSayTo source, the Creator's UUID

Recommended Posts

I have a HUD that receives messages thru llRegionSayTo.  The problem is this message could be sent to my HUD from anyone who has the "message sender script".

When I receive the message, I need to find a way to identify if this message is legit or not.

 

For example, lets say the sender has the following script.

default
{

    touch_start(integer total_number)
    {
        integer ch = -99;
        key recieverskey = llDetectedKey(0); //this is me wearing the receiver HUD
        llRegionSayTo(recieverskey,-99,"this is the message.");
    }
}

I want to ensure this message is being sent from the item created by me. I want the receiver to be able to tell if the message sent to me is legit or not by seeing the creator of the item who sent the message.

 

Lets say the receiver HUD has the following script:

default
{
    listen(integer chan, string name, key id, string msg)
    {   
        if(chan == -99)
        {
            llOwnerSay("--------------------------------------");
            llOwnerSay("sender's name is: " + name);
            llOwnerSay("sender's uuid is: " + (string)id);
            llOwnerSay("the message is: " + msg);
        }   
    }
}

I know inserting a line of llGetCreator() won't let me tell the creator of the object who just sent the message to my HUD. Is there anyway to tell the creator? would there be anyway to identify that the message being sent to me is legit and came from the item I created??

 

 

Edited by Xander Lopez

Share this post


Link to post
Share on other sites

Side note - if you have only one channel open you don't need to check the channel.

For your Problem: just make sure that sender and receiver have the same OWNER not creator. This 2 are often confused.
That way a stranger can not send you any command - even if they use one of your senders.

default
{
    listen(integer chan, string name, key id, string msg)
    {   
        if (llGetOwnerKey(id)==llGetOwner())
        {
            llOwnerSay("--------------------------------------");
            llOwnerSay("sender's name is: " + name);
            llOwnerSay("sender's uuid is: " + (string)id);
            llOwnerSay("the message is: " + msg);
        }   
    }
}

In case you really want to check the creator - then use llGetObjectdetails.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...