This commit is contained in:
Flummi 2016-09-05 11:21:52 +00:00
parent 9bfd49d04f
commit 3cb18c246e

View File

@ -7,19 +7,22 @@ module.exports = (bot, trigger, lib) => {
func: (e) => { func: (e) => {
var modes = e.message.split(' '); var modes = e.message.split(' ');
var user = modes[modes.length - 1]; var user = modes[modes.length - 1];
if(user.match(/(\+|-)/)) if(user.toLower() != 'f0ck') {
user = e.user.getNick(); if(user.match(/(\+|-)/))
else user = e.user.getNick();
modes.pop(); else
modes.shift(); modes.pop();
modes.shift();
if(modes.length > 0) { if(modes.length > 0) {
modes.forEach((entry,i,a) => { modes.forEach((entry,i,a) => {
bot.mode(e.channel, entry+' '+user, e.network); bot.mode(e.channel, entry+' '+user, e.network);
}); });
}
else
e.reply('no modes given');
} }
else else
e.reply('no modes given'); e.reply('f0ck you.');
}, },
desc: 'change Usermodes' desc: 'change Usermodes'
}); });