From a0227dfaebe3e0e2d33abfdc81bcfe0a84e2d8f4 Mon Sep 17 00:00:00 2001
From: Mia <49593536+mia-pi-git@users.noreply.github.com>
Date: Mon, 4 Oct 2021 08:21:58 -0500
Subject: [PATCH] /whois: Privatize more punishments to global staff
Roomstaff have no use for these. (Wob said this was OK).
---
server/chat-commands/info.ts | 37 ++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/server/chat-commands/info.ts b/server/chat-commands/info.ts
index c2aef29c45..33ba62f712 100644
--- a/server/chat-commands/info.ts
+++ b/server/chat-commands/info.ts
@@ -205,27 +205,28 @@ export const commands: Chat.ChatCommands = {
}
}
- const battlebanned = Punishments.isBattleBanned(targetUser);
- if (battlebanned) {
- buf += `
BATTLEBANNED: ${battlebanned.id}`;
- buf += ` ${Punishments.checkPunishmentExpiration(battlebanned)}`;
- if (battlebanned.reason) buf += Utils.html` (reason: ${battlebanned.reason})`;
- }
+ if (user.can('lock')) {
+ const battlebanned = Punishments.isBattleBanned(targetUser);
+ if (battlebanned) {
+ buf += `
BATTLEBANNED: ${battlebanned.id}`;
+ buf += ` ${Punishments.checkPunishmentExpiration(battlebanned)}`;
+ if (battlebanned.reason) buf += Utils.html` (reason: ${battlebanned.reason})`;
+ }
- const groupchatbanned = Punishments.isGroupchatBanned(targetUser);
- if (groupchatbanned) {
- buf += `
Banned from using groupchats${groupchatbanned.id !== targetUser.id ? `: ${groupchatbanned.id}` : ``}`;
- buf += ` ${Punishments.checkPunishmentExpiration(groupchatbanned)}`;
- if (groupchatbanned.reason) buf += Utils.html` (reason: ${groupchatbanned.reason})`;
- }
+ const groupchatbanned = Punishments.isGroupchatBanned(targetUser);
+ if (groupchatbanned) {
+ buf += `
Banned from using groupchats${groupchatbanned.id !== targetUser.id ? `: ${groupchatbanned.id}` : ``}`;
+ buf += ` ${Punishments.checkPunishmentExpiration(groupchatbanned)}`;
+ if (groupchatbanned.reason) buf += Utils.html` (reason: ${groupchatbanned.reason})`;
+ }
- const ticketbanned = Punishments.isTicketBanned(targetUser.id);
- if (ticketbanned) {
- buf += `
Banned from creating help tickets${ticketbanned.id !== targetUser.id ? `: ${ticketbanned.id}` : ``}`;
- buf += ` ${Punishments.checkPunishmentExpiration(ticketbanned)}`;
- if (ticketbanned.reason) buf += Utils.html` (reason: ${ticketbanned.reason})`;
+ const ticketbanned = Punishments.isTicketBanned(targetUser.id);
+ if (ticketbanned) {
+ buf += `
Banned from creating help tickets${ticketbanned.id !== targetUser.id ? `: ${ticketbanned.id}` : ``}`;
+ buf += ` ${Punishments.checkPunishmentExpiration(ticketbanned)}`;
+ if (ticketbanned.reason) buf += Utils.html` (reason: ${ticketbanned.reason})`;
+ }
}
-
if (targetUser.semilocked) {
buf += `
Semilocked: ${user.can('lock') ? targetUser.semilocked : "(reason hidden)"}`;
}