Try

request.getContent(function(result){

        Ape.log('Result: "' + result + '"');

        if(result == 0){
                Ape.log('- Gandalf: You will not past..");
                cmd.sendResponse('ERR', {'code': 1001, 'value':'User BANNED'});
                return 0;
        }
        else {
                Ape.log('- Frodo: Run away!!");
                cmd.user.setProperty('name', params.name);
                cmd.user.setProperty('ip', cmd.ip);
                return 1;
        }
}).bind(this);


Modify your PHP file to output manually the result and make two test:

First
<?php echo '0' ?>

Second
<?php echo '1' ?>

And let me know what your are getting in your APE log for each test.


Note:
I don't know if you are missing the point, but in your function copied
below you are including

if(result != ""){

that means that php is sending something, so in good theory the
if-inside  logic should allow to past instead of send the sendResponse error



On 01/23/2012 03:12 PM, utan wrote:
> Erick
>
> I have it just like you suggested and still let me go all the way..
>
> request.getContent(function(result){
>       if(result != ""){
>               Ape.log(result);
>               cmd.sendResponse('ERR', {'code': 1001, 'value':'User BANNED'});
>                       return 0;
>                       }else{
>               cmd.user.setProperty('name', params.name);
>               cmd.user.setProperty('ip', cmd.ip);
>
>               return 1;
>                       }
>       }).bind(this);
> the only differences there is , is that your have a more recent build
> than me, I think I have 111 or something along those lines..
> I am frustrated..
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-project@googlegroups.com
To unsubscribe from this group, send email to
ape-project+unsubscr...@googlegroups.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/

Reply via email to