From 800983f8f7bd7f85be3ad550d21fd0cc7923df20 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sun, 26 Jul 2015 04:51:51 -0400 Subject: [PATCH] Fix this.inputUsername with no comma This fixes the this.inputUsername API for .splitTarget for commands. Mainly relevant to using /lock and /ban on a user who's renamed themself. --- command-parser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/command-parser.js b/command-parser.js index 220ec6d7c0..9bd9aa317b 100644 --- a/command-parser.js +++ b/command-parser.js @@ -375,6 +375,7 @@ var Context = exports.Context = (function () { if (commaIndex < 0) { var targetUser = Users.get(target, exactName); this.targetUser = targetUser; + this.inputUsername = target.trim(); this.targetUsername = targetUser ? targetUser.name : target; return ''; }