Prevent /dt from bypassing ignore spectators

This commit is contained in:
Mia 2025-10-11 20:00:33 -05:00
parent e3854f06e8
commit ef70c3193a

View File

@ -642,7 +642,7 @@ export const commands: Chat.ChatCommands = {
tierDisplay === 'doubles tiers' ? pokemon.doublesTier :
tierDisplay === 'National Dex tiers' ? pokemon.natDexTier :
pokemon.num >= 0 ? String(pokemon.num) : pokemon.tier;
buffer += `|raw|${Chat.getDataPokemonHTML(pokemon, dex.gen, displayedTier)}\n`;
buffer += `|c|${user.getIdentity()}|/raw ${Chat.getDataPokemonHTML(pokemon, dex.gen, displayedTier)}\n`;
if (showDetails) {
let weighthit = 20;
if (pokemon.weighthg >= 2000) {
@ -711,7 +711,7 @@ export const commands: Chat.ChatCommands = {
break;
case 'item':
const item = dex.items.get(newTarget.name);
buffer += `|raw|${Chat.getDataItemHTML(item)}\n`;
buffer += `|c|${user.getIdentity()}|/raw ${Chat.getDataItemHTML(item)}\n`;
if (showDetails) {
details = {
Gen: String(item.gen),
@ -743,7 +743,7 @@ export const commands: Chat.ChatCommands = {
break;
case 'move':
const move = dex.moves.get(newTarget.name);
buffer += `|raw|${Chat.getDataMoveHTML(move)}\n`;
buffer += `|c|${user.getIdentity()}|/raw ${Chat.getDataMoveHTML(move)}\n`;
if (showDetails) {
details = {
Priority: String(move.priority),
@ -849,7 +849,7 @@ export const commands: Chat.ChatCommands = {
break;
case 'ability':
const ability = dex.abilities.get(newTarget.name);
buffer += `|raw|${Chat.getDataAbilityHTML(ability)}\n`;
buffer += `|c|${user.getIdentity()}|/raw ${Chat.getDataAbilityHTML(ability)}\n`;
if (showDetails) {
details = {
Gen: String(ability.gen) || 'CAP',
@ -863,7 +863,7 @@ export const commands: Chat.ChatCommands = {
}
if (showDetails) {
buffer += `|raw|<font size="1">${Object.entries(details).map(([detail, value]) => (
buffer += `|c|${user.getIdentity()}|/raw <font size="1">${Object.entries(details).map(([detail, value]) => (
value === '' ? detail : `<font color="#686868">${detail}:</font> ${value}`
)).join("&nbsp;|&ThickSpace;")}</font>\n`;
}
@ -1983,7 +1983,7 @@ export const commands: Chat.ChatCommands = {
}
}
buf.push(`</table>`);
return this.sendReply(`|raw|${buf.join("")}`);
return this.sendReply(`|c|${user.getIdentity()}|/raw ${buf.join("")}`);
},
formathelphelp: [
`/formathelp [format] - Provides information on the given [format].`,