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)"}`;
}