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);
|
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.api.report.notify('unquiet', server, user, channel,
|
||||||
dbot.t('unquiet_notify', {
|
dbot.t('unquiet_notify', {
|
||||||
'unquieter': dbot.config.name,
|
'unquieter': dbot.config.name,
|
||||||
|
@ -28,7 +28,7 @@ var api = function(dbot) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
'getProfile': function(server, nick, callback){
|
'getProfile': function(server, nick, callback){
|
||||||
dbot.api.users.resolveUser(server, nick, function(user){
|
dbot.api.users.resolveUser(server, nick, function(err, user){
|
||||||
if(user){
|
if(user){
|
||||||
this.db.read('profiles', user.id, function(err, profile){
|
this.db.read('profiles', user.id, function(err, profile){
|
||||||
if(!err){
|
if(!err){
|
||||||
|
@ -54,7 +54,7 @@ var radio = function(dbot) {
|
|||||||
var dj = this.data['icy-description'],
|
var dj = this.data['icy-description'],
|
||||||
song = event.input[1];
|
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) {
|
if(user) {
|
||||||
dbot.say(event.server, user.currentNick, dbot.t('radio_request',{
|
dbot.say(event.server, user.currentNick, dbot.t('radio_request',{
|
||||||
'user': event.user,
|
'user': event.user,
|
||||||
|
@ -33,6 +33,7 @@ var api = function(dbot) {
|
|||||||
}, this);
|
}, this);
|
||||||
ops = _.pluck(ops, 'name');
|
ops = _.pluck(ops, 'name');
|
||||||
|
|
||||||
|
/** TODO
|
||||||
dbot.api.users.resolveChannel(server, cName, function(channel) {
|
dbot.api.users.resolveChannel(server, cName, function(channel) {
|
||||||
if(channel) {
|
if(channel) {
|
||||||
var perOps = channel.op;
|
var perOps = channel.op;
|
||||||
@ -71,6 +72,7 @@ var api = function(dbot) {
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
**/
|
||||||
},
|
},
|
||||||
|
|
||||||
'notifyUsers': function(server, users, message) {
|
'notifyUsers': function(server, users, message) {
|
||||||
|
@ -85,7 +85,7 @@ var commands = function(dbot) {
|
|||||||
|
|
||||||
if(reason.charAt(reason.length - 1) != '.') reason += '.';
|
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(_.has(event.allChannels, channelName)) {
|
||||||
if(reportee) {
|
if(reportee) {
|
||||||
this.api.notify('report', event.server, event.rUser,
|
this.api.notify('report', event.server, event.rUser,
|
||||||
@ -114,7 +114,7 @@ var commands = function(dbot) {
|
|||||||
if(_.has(event.allChannels, channelName)) {
|
if(_.has(event.allChannels, channelName)) {
|
||||||
if(this.config.firstHost) {
|
if(this.config.firstHost) {
|
||||||
var first = message.split(' ')[0];
|
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)) {
|
if(user && _.include(this.config.host_lookup, channelName)) {
|
||||||
dbot.api.nickserv.getUserHost(event.server, first, function(host) {
|
dbot.api.nickserv.getUserHost(event.server, first, function(host) {
|
||||||
message = message.replace(first, first + ' [' + host + ']');
|
message = message.replace(first, first + ' [' + host + ']');
|
||||||
|
Loading…
Reference in New Issue
Block a user