mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
~uncouth
This commit is contained in:
parent
74af9642e1
commit
906291234b
@ -76,7 +76,6 @@ var commands = function(dbot) {
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: too much repeated code between loudest and cloudest yo
|
||||
'~loudest': function(event) {
|
||||
this.internalAPI.highscore('user_stats', 'lines', function(lCounts) {
|
||||
async.eachSeries(lCounts, function(lCount, next) {
|
||||
@ -89,6 +88,18 @@ var commands = function(dbot) {
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
'~uncouth': function(event) {
|
||||
this.internalAPI.highscore('user_stats', 'curses', function(lCounts) {
|
||||
async.eachSeries(lCounts, function(lCount, next) {
|
||||
dbot.api.users.getUser(lCount[0], function(user) {
|
||||
lCount[0] = user.primaryNick; next();
|
||||
});
|
||||
}, function() {
|
||||
event.reply(this.internalAPI.formatHighscore('Most uncouth users: ', lCounts));
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
'~cloudest': function(event) {
|
||||
var pathString = 'channels.' + event.rChannel.id + '.lines';
|
||||
this.internalAPI.highscore('user_stats', pathString, function(lCounts) {
|
||||
|
Loading…
Reference in New Issue
Block a user