3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

Get user by UUID API function [#331]

This commit is contained in:
reality 2013-04-09 23:16:00 +00:00
parent 86492e3efb
commit 9952e4583c

View File

@ -25,6 +25,14 @@ var api = function(dbot) {
});
},
// Return a user record given a UUID
'getUser': function(uuid, callback) {
this.db.get('users', uuid, function(err, user) {
if(err) user = false;
callback(user);
});
},
'getChannel': function(server, channelName, callback) {
var channel = false;
this.db.search('channel_users', {