From f13e20999809ec422265b5a36ced58705dea9484 Mon Sep 17 00:00:00 2001 From: Fantino Davide Date: Thu, 8 Sep 2022 11:51:26 +0200 Subject: [PATCH] improvements --- mapvote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapvote.js b/mapvote.js index 11086b2..f222b1b 100644 --- a/mapvote.js +++ b/mapvote.js @@ -355,7 +355,7 @@ export default class MapVote extends BasePlugin { //checks if there are enough players to start voting, if not binds itself to player connected //when there are enough players it clears old votes, sets up new nominations, and starts broadcast - beginVoting(force = false, steamid = null, cmdLayers = null) { + beginVoting(force = false, steamid = null, cmdLayers = []) { this.verbose(1, "Starting vote") const playerCount = this.server.players.length; const minPlayers = this.options.minPlayersForVote; @@ -431,7 +431,7 @@ export default class MapVote extends BasePlugin { strMsg += (steamID, formatChoice(choice, this.nominations[ choice ], this.tallies[ choice ])) + "\n"; } strMsg.trim(); - this.warn(steamID, strMsg) + if(steamID) this.warn(steamID, strMsg) // const winners = this.currentWinners; // await this.msgDirect(steamID, `Current winner${winners.length > 1 ? "s" : ""}: ${winners.join(", ")}`);