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.
This commit is contained in:
Guangcong Luo 2015-07-26 04:51:51 -04:00
parent 8fd4ea2bae
commit 800983f8f7

View File

@ -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 '';
}