diff --git a/server/chat.ts b/server/chat.ts index cb7ba7c797..50cf1dc779 100644 --- a/server/chat.ts +++ b/server/chat.ts @@ -1011,6 +1011,11 @@ export class CommandContext extends MessageContext { return true; } + if (this.user.locked && !(this.room?.roomid.startsWith('help-') || this.pmTarget?.can('lock'))) { + this.errorReply(`You cannot broadcast this command's information while locked.`); + throw new Chat.ErrorMessage(`To see it for yourself, use: /${this.message.slice(1)}`); + } + if (this.room && !this.user.can('show', null, this.room)) { this.errorReply(`You need to be voiced to broadcast this command's information.`); throw new Chat.ErrorMessage(`To see it for yourself, use: /${this.message.slice(1)}`);