forked from GitHub/dbot
fix most of the sstats stuff, still got to do merge trigger
This commit is contained in:
parent
1037070bff
commit
34acae025b
@ -155,7 +155,7 @@ var commands = function(dbot) {
|
||||
},
|
||||
|
||||
'~last': function(event) {
|
||||
dbot.api.users.resolveUser(event.server, event.params[1], function(user) {
|
||||
dbot.api.users.resolveUser(event.server, event.params[1], function(err, user) {
|
||||
if(user) {
|
||||
this.api.getUserStats(user.id, function(uStats) {
|
||||
if(uStats && uStats.last) {
|
||||
|
@ -20,7 +20,10 @@ var sstats = function(dbot) {
|
||||
// repetition
|
||||
'highscore': function(key, property, callback) {
|
||||
var pList = {},
|
||||
pPointer = property;
|
||||
if(!_.isArray(pPointer)) {
|
||||
pPointer = property.split('.');
|
||||
}
|
||||
|
||||
this.db.scan(key, function(item) {
|
||||
var id = item.id;
|
||||
@ -55,7 +58,7 @@ var sstats = function(dbot) {
|
||||
|
||||
'channelHighscore': function(key, server, channel, property, callback) {
|
||||
var cId = channel + '.' + server;
|
||||
var newProperty = 'channels.' + cId + '.' + property;
|
||||
var newProperty = ['channels', cId, property];
|
||||
this.internalAPI.highscore(key, newProperty, callback);
|
||||
}.bind(this),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user