But "getUser()" will give me the parent, which should always be the same for all subusers...
All I am trying to find out actually is how to determine if a user has more than one tab open - and the only chance I see right now is trying to figure out the concept (if existing) of the subusers.... Or is there another way to determine, how many tabs/windows a session has? On 29 Okt., 21:14, Johnathan Leppert <[email protected]> wrote: > The whole 'subuser' API and concept is very raw and needs some definite > refinement. I found it very awkward to work with. > > Try: > > sub.getUser().pubid > > sub.getUser().pipe etc. > > See: > > http://www.ape-project.org/docs/server/users/subuser.getUser.html > > Johnathan > > > > > > > > On Fri, Oct 29, 2010 at 3:05 PM, KaroDidi <[email protected]> wrote: > > Trying to play with the subuser object, I did not ever get anything > > out of it. Is it ever filled? Does it have ANY properties at all? > > > Desperate to find anything, I tried the following code, getting > > nothing but "undefined" or errors... > > > Ape.registerHookCmd("join", function(params, info) { > > var sub=info.subuser; > > Ape.log("------------- Subuser details"); > > Ape.log(sub); > > for (prop in sub){ > > Ape.log(prop+': '+sub.prop); > > } > > Ape.log("sess: "+sub.sessid); > > Ape.log("pubid: "+sub.pubid); > > Ape.log("IP: "+sub.getProperty('ip')); > > Ape.log("------------- End Subuser details"); > > }); > > > Result: > > > 2010-10-29 19:03:04 - libape-spidermonkey.c:2182 - JavaScript : > > ------------- Subuser details > > 2010-10-29 19:03:04 - libape-spidermonkey.c:2182 - JavaScript : > > [object subuser] > > 2010-10-29 19:03:04 - libape-spidermonkey.c:2182 - JavaScript : sess: > > undefined > > 2010-10-29 19:03:04 - libape-spidermonkey.c:2182 - JavaScript : pubid: > > undefined > > TypeError: sub.getProperty is not a function > > > Going crazy here... is there ANYTHING at all in the subuser? > > > Thanks > > > Peter > > > On 29 Okt., 16:34, KaroDidi <[email protected]> wrote: > > > Hi, > > > > the question already was kind of raised here: > >http://groups.google.com/group/ape-project/browse_thread/thread/63801... > > > > But never got answered, as far as I can see. > > > > Is there a way to find out about a user's subusers? Can I access them > > > on the server side? Can I count them? > > > > It obvioulsy is possible to track them manually by gathering the > > > information when hooking into the 'connect' command. > > > But when I send a raw to a user, it gets sent to ALL user's subusers > > > by the server - so why should I create another array/hash when the > > > server already knows it... > > > > Or is this handled internally and I cannot get the info with JS server > > > modules? > > > > Thanks > > > > Peter > > > -- > > You received this message because you are subscribed to the Google > > Groups "APE Project" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<ape-project%2bunsubscr...@googlegr > > oups.com> > > For more options, visit this group at > >http://groups.google.com/group/ape-project?hl=en > > --- > > APE Project (Ajax Push Engine) > > Official website :http://www.ape-project.org/ > > Git Hub :http://github.com/APE-Project/ -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
