diff --git a/modules/admin.js b/modules/admin.js index 48c5c5b..f9d42f0 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -61,6 +61,10 @@ var adminCommands = function(dbot) { } else { dbot.say(data.channel, 'It appears ' + params[1] + 'wasn\'t banned from that command, you fool.'); } + }, + + 'modehate': function(data, params) { + dbot.db.modehate.push(params[2]); } }; diff --git a/modules/modehate.js b/modules/modehate.js new file mode 100644 index 0000000..9809d9e --- /dev/null +++ b/modules/modehate.js @@ -0,0 +1,17 @@ +var modehate = function(dbot) { + var dbot = dbot; + + return { + 'listener': function(data) { + if(dbot.db.modehate.include(data.user)) { + dbot.instance.send('KICK', data.channel, data.user, 'gtfo') + } + }, + + on: 'MODE' + }; +}; + +exports.fetch = function(dbot) { + return modehate(dbot); +};