forked from GitHub/dbot
Match full user string. Fix for [#151].
This commit is contained in:
parent
dcf7d0448d
commit
6d442fd45c
@ -17,7 +17,7 @@ var api = function(dbot) {
|
||||
} else {
|
||||
// this is retarded
|
||||
user = user.toLowerCase();
|
||||
var toMatch = new RegExp(escapeRegexen(user), "i");
|
||||
var toMatch = new RegExp("^" + escapeRegexen(user) + "$", "i");
|
||||
|
||||
var resolvedUser = _.find(knownUsers.users, function(nick) {
|
||||
return nick.match(toMatch) !== null;
|
||||
|
Loading…
Reference in New Issue
Block a user