Skip to content

Commit

Permalink
Seasons: Fix logging (smogon#10373)
Browse files Browse the repository at this point in the history
  • Loading branch information
thejetou authored Jun 29, 2024
1 parent fc85da2 commit 4f59565
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/chat-plugins/seasons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ function getUserHTML(user: User, format: string) {
const buf = `<username>${user.name}</username>`;
const badgeType = getBadges(user, format).filter(x => x.format === format)[0]?.type;
if (badgeType) {
return `<img src="https://${Config.routes.client}/sprites/misc/${format}_${badgeType}.png" />` + buf;
let formatType = format.split(/gen\d+/)[1];
if (!['ou', 'randombattle'].includes(formatType)) formatType = 'rotating';
return `<img src="https://${Config.routes.client}/sprites/misc/${formatType}_${badgeType}.png" />` + buf;
}
return buf;
}
Expand Down

0 comments on commit 4f59565

Please sign in to comment.