user is now guaranteed to be in the channel, so...
This commit is contained in:
parent
4ebbcd1955
commit
4c5bd3dd1d
|
@ -18,20 +18,16 @@ module.exports = (bot, trigger, lib) => {
|
||||||
tmp.pop();
|
tmp.pop();
|
||||||
var modes;
|
var modes;
|
||||||
if(user.toLowerCase() != bot.me.nick.toLowerCase()) {
|
if(user.toLowerCase() != bot.me.nick.toLowerCase()) {
|
||||||
if(user in e.channel.names) {
|
if(modes = processModes(tmp.join(' '))) {
|
||||||
if(modes = processModes(tmp.join(' '))) {
|
if(checkModes(modes.give + modes.revoke, allowedModes)) {
|
||||||
if(checkModes(modes.give + modes.revoke, allowedModes)) {
|
if(modes.give != "") bot.mode(e.channel, '+' + modes.give + ' ' + (user+' ').repeat(modes.give.length), e.network);
|
||||||
if(modes.give != "") bot.mode(e.channel, '+' + modes.give + ' ' + (user+' ').repeat(modes.give.length), e.network);
|
if(modes.revoke != "") bot.mode(e.channel, '-' + modes.revoke + ' ' + (user+' ').repeat(modes.revoke.length), e.network);
|
||||||
if(modes.revoke != "") bot.mode(e.channel, '-' + modes.revoke + ' ' + (user+' ').repeat(modes.revoke.length), e.network);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
e.reply('Error! Allowed modes are: ' + allowedModes.join(','));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
e.reply('Syntax Error!');
|
e.reply('Error! Allowed modes are: ' + allowedModes.join(','));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
e.reply('user '+user+' not found!');
|
e.reply('Syntax Error!');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
e.reply('f0ck you hard');
|
e.reply('f0ck you hard');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user