Check getProfile read was successful

This commit is contained in:
Sam Nicholls 2013-04-21 15:27:08 +01:00
parent 0d76ce4166
commit 3130350f58

View File

@ -31,7 +31,12 @@ var api = function(dbot) {
dbot.api.users.resolveUser(server, nick, function(user){
if(user){
this.db.read('profiles', user.id, function(err, profile){
if(!err){
callback(false, user, profile);
}
else{
callback(true, null, null);
}
});
}
else{