mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 04:23:45 -05:00
Merge pull request #1179 from Relados/patch-5
Prevent use of modnote while locked or muted
This commit is contained in:
commit
6384b97b1a
|
|
@ -803,6 +803,8 @@ var commands = exports.commands = {
|
|||
mn: 'modnote',
|
||||
modnote: function (target, room, user, connection) {
|
||||
if (!target) return this.parse('/help modnote');
|
||||
if (user.locked || user.mutedRooms[room.id]) return this.sendReply("You cannot do this while unable to talk.");
|
||||
|
||||
if (target.length > MAX_REASON_LENGTH) {
|
||||
return this.sendReply("The note is too long. It cannot exceed " + MAX_REASON_LENGTH + " characters.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user