mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-09-11 18:55:38 -05:00
Allow /blockpms to block locked and semilocked users (#5923)
This commit is contained in:
@@ -679,7 +679,7 @@ const commands = {
|
||||
if (target in Config.groups) {
|
||||
user.blockPMs = target;
|
||||
this.sendReply(`You are now blocking private messages, except from staff and ${target}.`);
|
||||
} else if (target === 'autoconfirmed' || target === 'trusted') {
|
||||
} else if (target === 'autoconfirmed' || target === 'trusted' || target === 'unlocked') {
|
||||
user.blockPMs = target;
|
||||
this.sendReply(`You are now blocking private messages, except from staff and ${target} users.`);
|
||||
} else {
|
||||
@@ -691,7 +691,7 @@ const commands = {
|
||||
},
|
||||
blockpmshelp: [
|
||||
`/blockpms - Blocks private messages except from staff. Unblock them with /unblockpms.`,
|
||||
`/blockpms [ac/trusted/+] - Blocks private messages except from staff and the specified group.`,
|
||||
`/blockpms [unlocked/ac/trusted/+] - Blocks private messages except from staff and the specified group.`,
|
||||
],
|
||||
|
||||
'!unblockpms': true,
|
||||
|
||||
@@ -623,6 +623,7 @@ export class User extends Chat.MessageContext {
|
||||
}
|
||||
authAtLeast(minAuth: string, room: BasicChatRoom | null = null) {
|
||||
if (!minAuth || minAuth === ' ') return true;
|
||||
if (minAuth === 'unlocked') return !(this.locked || this.semilocked);
|
||||
if (minAuth === 'trusted' && this.trusted) return true;
|
||||
if (minAuth === 'autoconfirmed' && this.autoconfirmed) return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user