From ef250fbc056346d8f0c9d3f4670adc3301fe9de7 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 4 Sep 2014 14:54:49 +0000 Subject: [PATCH] fix resolveuser references --- modules/kick/commands.js | 2 +- modules/profile/api.js | 2 +- modules/radio/radio.js | 2 +- modules/report/api.js | 2 ++ modules/report/commands.js | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/kick/commands.js b/modules/kick/commands.js index 6621e2e..577cc58 100644 --- a/modules/kick/commands.js +++ b/modules/kick/commands.js @@ -28,7 +28,7 @@ var commands = function(dbot) { this.api.voice(server, quietee, channel); } - dbot.api.users.resolveUser(server, dbot.config.name, function(user) { + dbot.api.users.resolveUser(server, dbot.config.name, function(err, user) { dbot.api.report.notify('unquiet', server, user, channel, dbot.t('unquiet_notify', { 'unquieter': dbot.config.name, diff --git a/modules/profile/api.js b/modules/profile/api.js index 9324270..25a6c9c 100644 --- a/modules/profile/api.js +++ b/modules/profile/api.js @@ -28,7 +28,7 @@ var api = function(dbot) { }, 'getProfile': function(server, nick, callback){ - dbot.api.users.resolveUser(server, nick, function(user){ + dbot.api.users.resolveUser(server, nick, function(err, user){ if(user){ this.db.read('profiles', user.id, function(err, profile){ if(!err){ diff --git a/modules/radio/radio.js b/modules/radio/radio.js index e4ad617..b46f73d 100644 --- a/modules/radio/radio.js +++ b/modules/radio/radio.js @@ -54,7 +54,7 @@ var radio = function(dbot) { var dj = this.data['icy-description'], song = event.input[1]; - dbot.api.users.resolveUser(event.server, dj, function(user) { + dbot.api.users.resolveUser(event.server, dj, function(err, user) { if(user) { dbot.say(event.server, user.currentNick, dbot.t('radio_request',{ 'user': event.user, diff --git a/modules/report/api.js b/modules/report/api.js index 6967c96..93b1515 100644 --- a/modules/report/api.js +++ b/modules/report/api.js @@ -33,6 +33,7 @@ var api = function(dbot) { }, this); ops = _.pluck(ops, 'name'); +/** TODO dbot.api.users.resolveChannel(server, cName, function(channel) { if(channel) { var perOps = channel.op; @@ -71,6 +72,7 @@ var api = function(dbot) { }.bind(this)); } }.bind(this)); +**/ }, 'notifyUsers': function(server, users, message) { diff --git a/modules/report/commands.js b/modules/report/commands.js index b966a24..7b33b50 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -85,7 +85,7 @@ var commands = function(dbot) { if(reason.charAt(reason.length - 1) != '.') reason += '.'; - dbot.api.users.resolveUser(event.server, nick, function(reportee) { + dbot.api.users.resolveUser(event.server, nick, function(err, reportee) { if(_.has(event.allChannels, channelName)) { if(reportee) { this.api.notify('report', event.server, event.rUser, @@ -114,7 +114,7 @@ var commands = function(dbot) { if(_.has(event.allChannels, channelName)) { if(this.config.firstHost) { var first = message.split(' ')[0]; - dbot.api.users.resolveUser(event.server, first, function(user) { + dbot.api.users.resolveUser(event.server, first, function(err, user) { if(user && _.include(this.config.host_lookup, channelName)) { dbot.api.nickserv.getUserHost(event.server, first, function(host) { message = message.replace(first, first + ' [' + host + ']');