Skip to content

Commit

Permalink
chore: limit ingame messages to 300
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele committed Jun 22, 2024
1 parent b82c92f commit 2031365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/app-api/src/service/GameServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ export class GameServerService extends TakaroService<
}

async sendMessage(gameServerId: string, message: string, opts: IMessageOptsDTO) {
// Limit message length to 150 characters
// Limit message length to 300 characters
// Longer than this and gameservers start acting _weird_
message = message.substring(0, 150);
message = message.substring(0, 300);

const gameInstance = await this.getGame(gameServerId);
await gameInstance.sendMessage(message, opts);
Expand Down

0 comments on commit 2031365

Please sign in to comment.