mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
no idea how that was doing that but now it is fixed
This commit is contained in:
parent
5ce3c3dfb9
commit
e403d1d7f1
@ -14,13 +14,13 @@ var api = function(dbot) {
|
||||
// this is retarded
|
||||
user = user.toLowerCase();
|
||||
var resolvedUser = _.find(knownUsers.users, function(nick) {
|
||||
var toMatch = new RegExp(_.escape(user), "i");
|
||||
var toMatch = new RegExp(user, "i");
|
||||
return nick.match(toMatch) !== null;
|
||||
}, this);
|
||||
|
||||
if(!resolvedUser) {
|
||||
resolvedUser = _.find(knownUsers.aliases, function(nick, alias) {
|
||||
var toMatch = new RegExp(_.escape(user), "i");
|
||||
var toMatch = new RegExp(user, "i");
|
||||
return alias.match(toMatch) !== null;
|
||||
}, this);
|
||||
user = knownUsers.aliases[resolvedUser];
|
||||
|
Loading…
Reference in New Issue
Block a user