3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 06:19:24 +01:00

ok i fixed it

This commit is contained in:
reality 2013-08-30 02:55:20 +00:00
parent 3ce44418e7
commit de3eb90ab5
2 changed files with 6 additions and 7 deletions

View File

@ -25,6 +25,7 @@ var quotes = function(dbot) {
interQuote = '';
}
quote = quote.replace('~~' + ref + '~~', interQuote);
console.log('lol');
this.internalAPI.interpolatedQuote(server, channel, key, quote, callback);
}.bind(this));
}

View File

@ -82,25 +82,23 @@ var api = function(dbot) {
});
},
'getRandomChannelUser': function(server, channel, callback) {
'getRandomChannelUser': function(server, cName, callback) {
var channel;
this.db.search('channel_users', {
'server': server,
'channel': channel
'name': cName
}, function(result) {
channel = result;
}, function(err) {
if(!err) {
if(!err && channel) {
if(!_.isUndefined(channel.users)) {
var randomUser = channel.users[_.random(0, channel.users.length - 1)];
this.api.resolveUser(server, randomUser, function(user) {
callback(user);
});
this.api.getUser(randomUser, callback);
} else {
callback(false);
}
}
});
}.bind(this));
},
'getAllUsers': function(callback) {