Skip to content

Commit

Permalink
Slight tweak to ban lengths to give individual voters more power.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jan 9, 2025
1 parent 7e6396a commit b23ee17
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ban.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ async function UpdateTrial(cu) {
const guilty = yesWeight > noWeight;
let banPardonTime;
if (guilty) {
const clippedYesPercentage = Math.max(Math.min(yesPercentage, 0.7), 0.5);
const sentenceFraction = (clippedYesPercentage - 0.5) / (0.7 - 0.5);
const sentenceFraction = 2 * yesPercentage - 1;
const sentenceDays = Math.max(1, Math.round(365 * sentenceFraction));
const banLengthInSeconds = Math.round(sentenceDays * 24 * 60 * 60);
banPardonTime = moment().add(banLengthInSeconds, 'seconds').format();
Expand Down

0 comments on commit b23ee17

Please sign in to comment.