I've made some progress on the viewer and am about to settle a big gripe of mine since the beginning : the ability to issue commands through object Instant Messages as well as llOwnerSay calls. But first please check the previous blog post for I have edited it to show the advancement of the "not done yet" features for the time being.
Back to task IMs. I am posting about it here and now because I want to extend the capabilities of the viewer to cages and furnitures, without the hassle of a object that the user must wear to relay commands from objects around that they don't own. For instance, you step into a cage, and if you're using the viewer it closes and prevents you from teleporting out. Without support for object IMs the user would have to wear a special attachment that would llOwnerSay everything the cage says, provided it's allowed to etc. Instead of this I want to execute IM commands very much like llOwnerSay commands. It would be so easier for content creators and users.
But it would be so easier for a griefer to take advantage of your vulnerability too ! That's why I have thought about a very tight rule to allow/deny IM commands. Let me show you its pseudocode.
IF I am accepting IM commands (off by default I think)
AND owner is not muted
AND object is not muted
AND object is in the same sim
AND object is close enough (to be determined... 20 m ?)
AND command is not "force remove outfit"
.. IF object is owned by me
.. OR object is owned by a friend who can map me
.. OR object is in the same group than the parcel I'm on
.... execute command
.. END IF
This way there is no need to maintain an internal list of names of the people/objects allowed to control you, as it is managed by the actual friends list. And it is persistent across sessions and installations as well. Less hassle for the user and for me, more clarity for the user. Keep in mind that it doesn't prevent your viewer from being screwed until you relog, so you will have to use the Mute List against malicious users. There is no way around that unless you keep "accept IM commands" turned off. Basically if you're in a "allow cages to keep me prisoner" mode, expect to be more vulnerable.
The critical part is the double OR : either owned by a friend who can see me on the map so that discriminates a lot and still sticks to the relationship between an owner and their subs, or set to the same group than the parcel you're on (not the one the object is on, or you'd have rogue parcels with objects griefing people around) to allow public cages to keep you in (I'm thinking of Deitide, Stonehaven, Bondage Ranch, Bondage Playground...).
I would like to hear your comments about this rule (constructive ones please), knowing that I've already brainstormed a little so I think it will pretty much look like this in the code. But I would like to hear about potential loopholes, exploits, methods I have overlooked and such. I'm asking for your advices because I consider this to be VERY IMPORTANT as it is likely to be used by many content creators soon.
Thank you for your help !