diff --git a/modules/users/api.js b/modules/users/api.js index 8fc537a..ec97930 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -25,6 +25,27 @@ var api = function(dbot) { }); }, + // Return many user records given primary nicks of aliases + 'resolveUsers': function(server, nicks, callback) { + var users = []; + this.db.search('users', { 'server': server }, function(result) { + var pNicks = result.aliases.slice(0).unshift(result.primaryNick); + for(var i=0;i