From 3b3aa280e03a87f9275a82ff83622cb6087aa4c8 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 22 Jan 2013 00:24:12 +0000 Subject: [PATCH] getAllUsers --- modules/users/api.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/users/api.js b/modules/users/api.js index 9ecadc2..349e3a2 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -40,6 +40,10 @@ var api = function(dbot) { return dbot.db.knownUsers[server].users; }, + 'getAllUsers': function() { + return _.pluck(dbot.db.knownUsers, 'users'); + }, + 'isKnownUser': function(server, nick) { var knownUsers = this.getServerUsers(server); return (_.include(knownUsers.users, nick) || _.has(knownUsers.aliases, nick));