Jump to content

Is channel communicating 'safe'?


Driving
 Share

You are about to reply to a thread that has been inactive for 4484 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Lets say I have an object on some land, and another object worn on my avatar.

(This is for something similar to a firing range)

I basically want it so once the target (object on the land) is touched, it does some stuff depending on what was worn when it was clicked (It can't animate the same for every weapon shot at it!) Also the item worn would do some stuff, (an animation of shooting and unequip -as it needs to be reloaded)

-The way I thought of doing it was with a channel (PLEASE correct me if there is a better way!!) aka /1020 weaponname would be said by the worn item and then the object on the land would know which weaponname shot it and could annimate.

 

But what i'm wondering, is I offer some reward for shooting a target, is my system above 'safe'?

-Is there a way to find out what is being said across a random channel/find out which channel is being used?

Because if there is someone could find that they just need to keep spamming /1020 weaponname to get moar rewards :P

 

Thanks alot.

 

EDIT: I just realised you can use the event 'listen(integer ch, string name, key id, string msg) { }' to pretty much get what is being said so that makes my thing unsafe, how would I fix/prevent this? -What are the best options to communicate between objects?
EDIT2: You need the channel number already though, I think(!)... So is channel communicating safe, or can people get my channel number? :(

Link to comment
Share on other sites

I'm not completely sure how the system you describe works, but you might find llRegionSayTo useful, since only the object or avatar to whom the message is addressed can receive it.   It's got the added attraction that, if id is an avatar, then llRegionSayTo(id,channel,msg) sends msg to all of that avatar's attachments that are listening on the channel.

I think what I would do is play with having the objects and the target identify each other using a common channel, and then switch to  llRegionSayTo(), maybe calculating a channel based on the uuid of attachment's owner.  The "id" in listen(integer channel, string name, key id, string msg) gives you the object's uuid, and llGetOwnerKey(id) tells you who owns it.

Link to comment
Share on other sites

There are many more things worth worrying about than that.  For one thing, you can choose any random channel between −2,147,483,648 and +2,147,483,647 .  That's a lot of potential channels.  Anyone guessing at random will have a very tiny chance of finding yours. (Yes, I know that the number is actually smaller than that and that there are plenty of channels you wouldn't want to use, but still..... it's a BIG number.)  Second, you can always encrypt your message if you really worry that much.  If you don't like built-in functions like llSHA1String, then there are plenty of others you could write or find on line.  Third, you always have the option (as long as the sender and receiver are in the same sim) of using llRegionSayTo, which sends your message only to the specific object that you have identified as its target audience.  No other listener can hear it, even if it has the channel.

Link to comment
Share on other sites

(Sorry ... being pedantic I know, but SHA1 isn't an encryption function.  If you could reverse it to get back to the original text (i.e. decrypt it) it wouldn't be much use as a hash function :))

... and if anyone fancies writing their own encryption, I strongly recommend reading http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html (specifically the "Foot-Shooting Prevention Agreement") :)

Kimm.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4484 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...