forked from GitHub/dbot
fix resolveuser references
This commit is contained in:
parent
e096daa605
commit
ef250fbc05
@ -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,
|
||||
|
@ -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){
|
||||
|
@ -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,
|
||||
|
@ -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) {
|
||||
|
@ -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 + ']');
|
||||
|
Loading…
Reference in New Issue
Block a user