3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00
dbot/modules/modehate.js

23 lines
774 B
JavaScript
Raw Normal View History

2011-10-12 19:09:55 +02:00
var modehate = function(dbot) {
var dbot = dbot;
return {
2011-10-15 20:48:54 +02:00
'listener': function(data, params) {
2011-12-04 17:59:30 +01:00
console.log('THIS: ' + data.raw[0]);
2011-10-17 14:35:30 +02:00
if(data.raw[0].indexOf('-oooo') != -1) {
2011-12-04 17:59:30 +01:00
console.log('test');
2011-12-04 18:03:33 +01:00
console.log('KICK ' + data.channel + ' ' + data.user + ' :gtfo - mass deop protection');
2011-10-24 14:51:02 +02:00
dbot.instance.send('KICK ' + data.channel + ' ' + data.user + ' :gtfo - mass deop protection');
2011-10-17 14:35:30 +02:00
} else if(dbot.db.modehate.include(data.user) && data.raw[0].indexOf('-o') != -1) {
2011-10-24 14:54:42 +02:00
dbot.instance.send('KICK ' + data.channel + ' ' + data.user + ' :gtfo');
2011-10-15 20:51:58 +02:00
}
2011-10-12 19:09:55 +02:00
},
2011-10-12 22:25:42 +02:00
'on': 'MODE'
2011-10-12 19:09:55 +02:00
};
};
exports.fetch = function(dbot) {
return modehate(dbot);
};