bugfiggserei
This commit is contained in:
parent
4ba72dcb1e
commit
e90aaf0cb6
|
@ -5,7 +5,7 @@ module.exports = (bot, trigger, lib) => {
|
||||||
level: 100,
|
level: 100,
|
||||||
active: 1,
|
active: 1,
|
||||||
func: (e) => {
|
func: (e) => {
|
||||||
var modes = e.message.split(' ');
|
var modes = e.message.trim().split(' ');
|
||||||
var user = modes[modes.length - 1];
|
var user = modes[modes.length - 1];
|
||||||
if(user.toLowerCase() != bot.me.nick.toLowerCase()) {
|
if(user.toLowerCase() != bot.me.nick.toLowerCase()) {
|
||||||
if(user.match(/(\+|-)/))
|
if(user.match(/(\+|-)/))
|
||||||
|
@ -13,11 +13,10 @@ module.exports = (bot, trigger, lib) => {
|
||||||
else
|
else
|
||||||
modes.pop();
|
modes.pop();
|
||||||
modes.shift();
|
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
|
else
|
||||||
e.reply('no modes given');
|
e.reply('no modes given');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user