Skip to content

Commit

Permalink
Merge pull request #68 from Thomas-Smyth/beta
Browse files Browse the repository at this point in the history
SquadJS v1.4.1 Release
  • Loading branch information
Thomas-Smyth authored Sep 15, 2020
2 parents e623cb1 + e86e73b commit f47f0f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SquadJS",
"version": "1.4.0",
"version": "1.4.1",
"repository": "https://github.com/Thomas-Smyth/SquadJS.git",
"author": "Thomas Smyth <https://github.com/Thomas-Smyth>",
"license": "BSL-1.0",
Expand Down
12 changes: 12 additions & 0 deletions plugins/skipmap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ export default {
await server.rcon.warn(info.steamID, COPYRIGHT_MESSAGE);

playerVotes[info.steamID] = info.message;

// If 50 people voted in favour, instantly win the vote
if (votePos >= 50) {
await server.rcon.broadcast(
`The vote to skip the current map has passed. ${votePos} voted in favour, ${voteNeg} against.`
);
await server.rcon.execute('AdminEndMatch');
timeLastVote = new Date();
voteActive = false;
clearInterval(intervalReminderBroadcasts);
clearTimeout(timeoutVote);
}
});
}
};

0 comments on commit f47f0f8

Please sign in to comment.