CODE REQUEST:: Authentication Server
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-10-2005 17:34
Okay. This isn't a bounty yet. I might actually be able to hack this on my own. If you have something that does this, that would rock.
Background: The Prim Reaper, you know, that large airship that will soon be the terror of the skies? It needs some security. I don't need random jackasses stealing a FreakRocket (large, flying bomb) from my launch bay and using it to... rob liquor stores or whatever. I want to make all the sensitive functions on my ship work only for authorized users. I want a single, low-lag script handling this.
Sensitive Functions Are: - Piloting Controls (Captains Chair) - Turrets (four to six of these following the ship) - Launching Rail (spawns selected objects for deployment) - Gear Box (Reaper-Issue flight harness, weapons, eyepatches, etc) - Launch Bay Doors, Access Hatch (SetPos,SetPrimParams Doors) - Plank (Extends Outwards For... walking people off of it)
These functions would call the Authentication Server with the user key, it would match the key and return a YES if passed, or WTF, HELL NO! if failed. The keys would be put in a notecard or something else readable (not stored in script state).
Unless you have something that checks for Is User Part of Group X, which would would too, I guess.
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-10-2005 18:01
This sounds fun! If you need any help with it feel free to contact me. ==Chris
|
Velox Severine
Network Slave
Join date: 19 May 2005
Posts: 73
|
07-10-2005 18:46
Hiya Burke,
I myself just wrote something like this, except for a tipjar system (tipjars contact a server to receive and access list, then only allow authorized users to activate the tipjar) however if I stripped it down to its base components, I believe you could adapt this code to your needs. Drop me an IM in world, on IRC, forums, or on YIM (velox_severine).
_____________________
--BEGIN SIGNATURE STRING-- IkkgY2FtZSwgSSBzYXcsIEkgY29ucXVlcmVkLiIgLS1KdWxpdXMgQ2Flc2Fy --END SIGNATURE STRING--
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-10-2005 19:44
Thanks dudes.
|
Fa nyak
>(O.o)<
Join date: 8 Oct 2004
Posts: 342
|
07-10-2005 19:58
integer llSameGroup(key id); http://secondlife.com/badgeo/wakka.php?wakka=llSameGroupthis might be easier than writing a whole server system, yes?
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-10-2005 20:19
It might. but how would I code that in place of, say, checking for OWNER? I really wish we had more sample code in the wiki. 
|
Velox Severine
Network Slave
Join date: 19 May 2005
Posts: 73
|
07-10-2005 20:45
llSameGroup and llGetOwner I know...it simply wouldn't work for my purposes as it would need to take people for at least 3-4 groups (on my tipjar system) however if you just want to check for owner... default { touch_start(integer num) { if (llDetectedKey(0) == llGetOwner()) // If touched by owner, execute code { llWhisper(0, "w00t!"); } } }
_____________________
--BEGIN SIGNATURE STRING-- IkkgY2FtZSwgSSBzYXcsIEkgY29ucXVlcmVkLiIgLS1KdWxpdXMgQ2Flc2Fy --END SIGNATURE STRING--
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-10-2005 21:11
I want to check for group. As in, is this person the same group as the ship, or is he about to get ejected into the next region.
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
07-10-2005 21:42
SImple check "Is object group same as the group tag of the toucher": touch_start(integer n) { key av = llDetectedKey(0); if( llSameGroup(av) ) { //Do nice things here } else { //Do un-nice things here } } Or, group is right or it's the owner and we dont' care about the group for the owner: touch_start(integer n) { key av = llDetectedKey(0); if( llSameGroup(av) || av == llGetOwner() ) { //Do nice things here } else { //Do un-nice things here } } For seating: changed(integer change) { if (change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if( llSameGroup(av) || av == llGetOwner() ) { //Do nice things here } else { llUnSit(av); //Do un-nice things here } }
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-10-2005 21:49
thank you.
The Un-Nice things I won't speak of because they potentially violate the TOS. Of course, anything that does more than say 'Hello,Avatar' potentially violates the TOS.
|
Burke Prefect
Cafe Owner, Superhero
Join date: 29 Oct 2004
Posts: 2,785
|
07-12-2005 13:22
I put the SameGroup code into the primary pilot seat, control buttons for the doors and launcher, etc, and they work fine. Getting SameGroup to work on my smaller six-man ship was a little troublesome, because if someone unauthorized sat on it, they'd be sitting and I'd get ejected and still be flying the damn thing. I'll play with it some more.
|