Hi all

I have a problem that i can not solve. If i try to explain it with this 
example:

/*
 * You can return error in two ways:
 *  By returning 0 to return a "BAD_PARAMS"
 *  By returning an array [code, error] for custom errors.
 */
Ape.registerCmd("foocmd", true, function(params, info) {
        if (!$defined(params.john)) return 0; // send a "BAD_PARAMS" RAW to the 
user

        if (params.john != "doe") return ["209", "NOT_A_JOHN_DOE"];
        return 1;

*});*

*

This is the example that i can finde on the ape site. As you can see, it uses 
the info object that is described with these sentenses:

*

*info* - *(object)* Contains information about the client:


   - *host* (string): Host sent on HTTP headers.
   - *client* (socket): The client socket's object.
   - *chl* (number): The challenge number.
   - *ip* (string): The client's IP.
   - *user* (user <http://www.ape-project.org/docs/server/users/user.html>) 
   User object (if logged in).
   - *subuser* 
(subuser<http://www.ape-project.org/docs/server/users/subuser.html>) 
   User object (if logged in).
   - *http* (array): contains user HTTP headers.

But if i want to use the info object it says, info is undefined. So how do 
i have to call the function foocmd that the info object is defined?
Thanks
Sanoi


-- 
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/

Reply via email to