kickcount

This commit is contained in:
Luke Slater 2011-10-12 17:45:00 +01:00
parent f48da5bcb4
commit cbd96fb765

View File

@ -10,12 +10,17 @@ var userCommands = function(dbot) {
'~kickcount': function(data, params) { '~kickcount': function(data, params) {
if(!dbot.db.kicks.hasOwnProperty(params[1])) { if(!dbot.db.kicks.hasOwnProperty(params[1])) {
var kicks = '0'; var kicks = '0';
} else {
var kicks = dbot.db.kicks[params[1]];
} }
if(!dbot.db.kickers.hasOwnProperty(params[1])) { if(!dbot.db.kickers.hasOwnProperty(params[1])) {
var kicked = '0'; var kicked = '0';
} else {
var kicked = dbot.db.kickers[params[1]];
} }
dbot.say(data.channel, params[1] + ' has been kicked ' + kicks + ' times and has kicked people ' + kicked + ' times.'); dbot.say(data.channel, params[1] + ' has been kicked ' + kicks + ' times and has kicked people ' + kicked + ' times.');
}, },