Wifi: disallow overwriting other punishments with giveaway bans

This commit is contained in:
Bär Halberkamp 2017-10-29 15:21:35 +01:00
parent 1e13ec74bb
commit 9fd88de6c1

View File

@ -685,7 +685,7 @@ let commands = {
if (target.length > 300) {
return this.errorReply("The reason is too long. It cannot exceed 300 characters.");
}
if (Giveaway.checkBanned(room, targetUser)) return this.errorReply(`User '${this.targetUsername}' is already banned from entering giveaways.`);
if (Punishments.getRoomPunishType(room, this.targetUsername)) return this.errorReply(`User '${this.targetUsername}' is already punished in this room.`);
Giveaway.ban(room, targetUser, target);
if (room.giveaway) room.giveaway.kickUser(targetUser);