Skip to content

Commit e3411a4

Browse files
committed
Prevent 'extrapoints' command from accepting empty usernames
1 parent 5412045 commit e3411a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/bot-modules/tour-ldb-custom/commands.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,8 @@ module.exports = {
842842
const uid = Text.toId(argParts[0]);
843843
const name = (argParts[0] + "").trim();
844844

845-
if (uid.length > 19) {
846-
return this.errorReply(this.mlt(17) + ": " + uid);
845+
if (!uid || uid.length > 19) {
846+
return this.errorReply(this.mlt(17) + ": " + (uid || "''"));
847847
}
848848

849849
const points = parseInt((argParts[1] + "").trim());

0 commit comments

Comments
 (0)