I did a little function to retrive all informations available when
receiving a command from a client.
I basically found:
infos[host]=18.ape.mydomain.net:6969
infos[client]=[object apesocket]
infos[chl]=2
infos[ip]=1.2.3.4
infos[user]=[object user]
infos[subuser]=[object subuser]
... plus the pipe object in the user instance(s).
I would like to know if it is possible to retrieve other data, more
especially the session ID of the user (chen using sessions, of
course).
Another information may be usefull too (at least for me), like knowing
the exact status of the user's connexion to the APE server: is a
'CHECK' request currently open (the user is definitively still
connected), or not (there is a chance he left the website). If not,
when was the last connexion, ...
Also, I noticed there are several properties stored in several
objects, which can be retrieved with the getProperty() function. Is
there somewhere an extensive list of all properties filled by default
for each object type (pipe, user, channel, ...) ?
Many thanks in advance.
Indeed, you can look at "APE_JS_NATIVE(apeuser_sm_get_property)" in
libape-spidermonkey.c
When a registerCmd is called, you can be sure that the user is still
connected at this time.
Btw, don't forget that you can store informations in "user" object an
resolve them in cmd.user.
i.e.
Ape.addEvent("adduser", function(user) {
user.foo = "bar";
});
Ape.registerCmd("bla", true, function(params, cmd) {
Ape.log(cmd.user.foo);
});
All users, channel objects are persistants.
Hope this help ;)
Anthony
nouknouk a �crit :
Hi, nouknouk,
Indeed, you can look at "APE_JS_NATIVE(apeuser_sm_get_property)" in libape-spidermonkey.c
When a registerCmd is called, you can be sure that the user is still connected at this time.