mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
kickers
This commit is contained in:
parent
6528eace6e
commit
04dc901974
@ -4,7 +4,7 @@ var kick = function(dbot) {
|
|||||||
return {
|
return {
|
||||||
'listener': function(data) {
|
'listener': function(data) {
|
||||||
if(data.kickee == dbot.name) {
|
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.say(data.channel, 'Thou shalt not kick ' + dbot.name);
|
||||||
dbot.db.kicks[dbot.name] += 1;
|
dbot.db.kicks[dbot.name] += 1;
|
||||||
} else {
|
} else {
|
||||||
@ -13,6 +13,13 @@ var kick = function(dbot) {
|
|||||||
} else {
|
} else {
|
||||||
dbot.db.kicks[data.kickee] += 1;
|
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)');
|
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])) {
|
if(!dbot.db.kicks.hasOwnProperty(params[1])) {
|
||||||
dbot.say(data.channel, params[1] + ' has either never been kicked or does not exist.');
|
dbot.say(data.channel, params[1] + ' has either never been kicked or does not exist.');
|
||||||
} else {
|
} 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