mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Wifi: disallow overwriting other punishments with giveaway bans
This commit is contained in:
parent
1e13ec74bb
commit
9fd88de6c1
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user