fixes detection whether last argument is a username or not
This commit is contained in:
parent
ca21ce68c5
commit
4ebbcd1955
|
@ -12,7 +12,7 @@ module.exports = (bot, trigger, lib) => {
|
||||||
var tmp = e.message.trim().split(' ');
|
var tmp = e.message.trim().split(' ');
|
||||||
tmp.shift();
|
tmp.shift();
|
||||||
var user = tmp[tmp.length - 1];
|
var user = tmp[tmp.length - 1];
|
||||||
if(user.match(/(\+|-)/))
|
if(!(user in e.channel.names))
|
||||||
user = e.user.getNick();
|
user = e.user.getNick();
|
||||||
else
|
else
|
||||||
tmp.pop();
|
tmp.pop();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user