kud / ed-209

I'm an IRC bot!
8 stars 4 forks source link

Can't send response from asynchrone calls #2

Closed rhannequin closed 11 years ago

rhannequin commented 11 years ago

With client.say(to, app[cmd].apply(app, params));, it is impossible to return value from asynchrone calls.

var app = {
  ...
  foo: function() {
    myFunc({
      url: 'http://foo.com',
      done: function (res) {
        /* I want to send `res` to my client */
      }
    });
  }
  ...
}