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 {
|
} else {
|
||||||
// this is retarded
|
// this is retarded
|
||||||
user = user.toLowerCase();
|
user = user.toLowerCase();
|
||||||
var toMatch = new RegExp(escapeRegexen(user), "i");
|
var toMatch = new RegExp("^" + escapeRegexen(user) + "$", "i");
|
||||||
|
|
||||||
var resolvedUser = _.find(knownUsers.users, function(nick) {
|
var resolvedUser = _.find(knownUsers.users, function(nick) {
|
||||||
return nick.match(toMatch) !== null;
|
return nick.match(toMatch) !== null;
|
||||||
|
Loading…
Reference in New Issue
Block a user