Skip to content

Commit

Permalink
Merge pull request #109 from Xayanide/dev-lobbyterminator-improve-tex…
Browse files Browse the repository at this point in the history
…ts-and-error-messages

refactor(plugins#LobbyTerminator): improve texts and error messages
  • Loading branch information
Meowhal authored Jun 2, 2022
2 parents fb90290 + 797c591 commit e7d5145
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugins/LobbyTerminator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class LobbyTerminator extends LobbyPlugin {
if (this.terminateTimer) {
clearTimeout(this.terminateTimer);
this.terminateTimer = undefined;
this.logger.trace('terminate_timer canceled');
this.logger.trace('Cleared the lobby terminator timer.');
}
}

Expand All @@ -41,9 +41,9 @@ export class LobbyTerminator extends LobbyPlugin {
if (this.terminateTimer) {
clearTimeout(this.terminateTimer);
}
this.logger.trace('terminate_timer start');
this.logger.trace('Started the lobby terminator timer.');
this.terminateTimer = setTimeout(() => {
this.logger.info('terminated lobby');
this.logger.info('Terminated the lobby.');
this.lobby.CloseLobbyAsync();
}, this.option.terminate_time_ms);
}
Expand All @@ -52,12 +52,12 @@ export class LobbyTerminator extends LobbyPlugin {
CloseLobby(time_ms: number = 0): void {
if (time_ms === 0) {
if (this.lobby.players.size === 0) {
this.logger.info('terminated lobby');
this.logger.info('Terminated the lobby.');
this.lobby.CloseLobbyAsync();
} else {
this.lobby.SendMultilineMessageWithInterval([
'!mp password closed',
'This lobby will be closed after everyone leaves.',
'This lobby will be closed when everyone leaves.',
'Thank you for playing with the auto host rotation lobby.'
], this.multilimeMessageInterval, 'close lobby announcement', 100000);
this.option.terminate_time_ms = 1000;
Expand Down

0 comments on commit e7d5145

Please sign in to comment.