Merge pull request #400 from SamStudio8/database

Check getProfile read was successful
This commit is contained in:
reality 2013-04-21 07:31:36 -07:00
commit 420d40c848

View File

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