def- · GitHub

I donated 32€ this morning to close out USA1 and USA3, and was surprised when they went from 76/100 and 42/50 to 93/100 and 42/50. Not a big deal, but odd.

The existing code in effect adds sponsored servers' numbers, then distributes the general funds by adding to each entry entry remaining * (funds / remaining costs). RUS4 and RUS6 are 50% funded right now, but if someone sponsored both of them at 50% they would jump to 75%, not 100%, because the general fund is at 50% and 30€ won't swing that much.

This changes it to (in effect) distribute the general funds first, add direct payments, and then redistribute any overflow as general funds. I think it makes more sense, especially if allowing direct payments for a server without sponsoring it. Those payments might be much smaller compared to the total and this makes them actually show up as intended.

Live state at time of PR:
scrot_2025-12-05-72376_631x1167

State with these changes at time of PR:
scrot_2025-12-05-72395_631x1169

Read the original on github.com ↗