mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 03:33:07 +01:00
kickers
This commit is contained in:
parent
6528eace6e
commit
04dc901974
@ -4,7 +4,7 @@ var kick = function(dbot) {
|
||||
return {
|
||||
'listener': function(data) {
|
||||
if(data.kickee == dbot.name) {
|
||||
dbot.instance.join(data.channel); // TODO: make interface
|
||||
dbot.instance.join(data.channel);
|
||||
dbot.say(data.channel, 'Thou shalt not kick ' + dbot.name);
|
||||
dbot.db.kicks[dbot.name] += 1;
|
||||
} else {
|
||||
@ -13,6 +13,13 @@ var kick = function(dbot) {
|
||||
} else {
|
||||
dbot.db.kicks[data.kickee] += 1;
|
||||
}
|
||||
|
||||
if(!dbot.db.kickers.hasOwnProperty(data.user)) {
|
||||
dbot.db.kickers[data.user] = 1;
|
||||
} else {
|
||||
dbot.db.kickers[data.user] += 1;
|
||||
}
|
||||
|
||||
dbot.say(data.channel, data.kickee + '-- (' + data.kickee + ' has been kicked ' + dbot.db.kicks[data.kickee] + ' times)');
|
||||
}
|
||||
},
|
||||
|
@ -11,7 +11,7 @@ var userCommands = function(dbot) {
|
||||
if(!dbot.db.kicks.hasOwnProperty(params[1])) {
|
||||
dbot.say(data.channel, params[1] + ' has either never been kicked or does not exist.');
|
||||
} else {
|
||||
dbot.say(data.channel, params[1] + ' has been kicked ' + dbot.db.kicks[params[1]] + ' times.');
|
||||
dbot.say(data.channel, params[1] + ' has been kicked ' + dbot.db.kicks[params[1]] + ' times and has kicked people ' + dbot.db.kickers[params[1]] + ' times.');
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user