Page 1 of 1

[BOUNTY] Played-time ban

Posted: Wed Apr 26, 2023 9:27 pm
by WineAllWine
I want to be able to place a ban that will automatically expire after a certain amount of hours played. The main thing I'd want to use this for is antag bans - I want to ensure a player plays, say 30 hours as crew before they can do antag again. I can imagine similar useful things for assistant, sec or head bans.

It must be life hours, not observed.

The bounty is 15GBP, doubled if you instead choose to donate it to a charity

Vekter has also kindly offered another £10

[Edit by Timberpoes ft. Misdoubtful and Kieth4]
We are also happy to add antag token(s) to this bounty.

Re: [BOUNTY] Played-time ban

Posted: Wed Apr 26, 2023 10:38 pm
by TheSmallBlue
this isnt a thing already??

Re: [BOUNTY] Played-time ban

Posted: Wed Apr 26, 2023 10:44 pm
by Timberpoes
This could be very useful. I'll ask the other headmins if they're willing to chip in an antag token for this as well.

Re: [BOUNTY] Played-time ban

Posted: Wed Apr 26, 2023 10:52 pm
by Timberpoes
Misdoubtful also expressed an interest in additionally supporting this via antag token(s), so I've incorporated that into the OP.

Re: [BOUNTY] Played-time ban

Posted: Wed Apr 26, 2023 10:55 pm
by Timberpoes
And also Kieth4, so full headmin backing on this one. Good bounty.

Re: [BOUNTY] Played-time ban

Posted: Thu Apr 27, 2023 4:57 am
by Itseasytosee2me
How the heck am I supposed to donate my github good boy points to charity.
I hope the starving kids in south sudan appreciate being able to make TWO feature prs and maybe a balance change.

Re: [BOUNTY] Played-time ban

Posted: Fri Apr 28, 2023 12:39 pm
by LeekiLoku
Time to learn how to code on byonds broken system. I need those anteg tokuns

Re: [BOUNTY] Played-time ban

Posted: Fri Apr 28, 2023 3:26 pm
by Mothblocks
the harder part is setting up the database

Re: [BOUNTY] Played-time ban

Posted: Fri Apr 28, 2023 8:01 pm
by Nabski
You've already got tracked playtime for roles. Couldn't it just compare what that is to a value set when the ban is placed?
That seems better than setting up a new database.

Re: [BOUNTY] Played-time ban

Posted: Sat Apr 29, 2023 9:43 am
by TheFinalPotato
It's impossible to test code like this without a db running locally, which is a pain because the default "testing" template in the codebase is aggressively outdated

Re: [BOUNTY] Played-time ban

Posted: Sat Apr 29, 2023 9:15 pm
by Vekter
TheSmallBlue wrote: Wed Apr 26, 2023 10:38 pm this isnt a thing already??
No, bans can only be placed based on real-time duration.

Re: [BOUNTY] Played-time ban

Posted: Sat Apr 29, 2023 9:45 pm
by Pandarsenic
Ban with autocalc of living connected hours? Hell yeah let's go.

Re: [BOUNTY] Played-time ban

Posted: Sun Apr 30, 2023 5:45 pm
by Mothblocks
TheFinalPotato wrote: Sat Apr 29, 2023 9:43 am It's impossible to test code like this without a db running locally, which is a pain because the default "testing" template in the codebase is aggressively outdated
You will soon have no excuse

Re: [BOUNTY] Played-time ban

Posted: Thu Aug 17, 2023 4:33 pm
by Vekter
I'm willing to add £10 to this bounty.

Re: [BOUNTY] Played-time ban

Posted: Sat Aug 19, 2023 10:39 pm
by TypicalRig
Living connected hours isn't enough. We already have players that will SSD but stay connected and have SS13 semi-afk in the background with maybe their sounds on so they can check the game. There's no point in having this kind of ban if it can be easily bypassed. Let's maybe extend the code to check for actual ingame input every so and so minutes?

Re: [BOUNTY] Played-time ban

Posted: Sun Aug 20, 2023 7:07 am
by Imitates-The-Lizards
TypicalRig wrote: Sat Aug 19, 2023 10:39 pm Living connected hours isn't enough. We already have players that will SSD but stay connected and have SS13 semi-afk in the background with maybe their sounds on so they can check the game. There's no point in having this kind of ban if it can be easily bypassed. Let's maybe extend the code to check for actual ingame input every so and so minutes?
This is true but living hours played is still definitely a huge improvement over just "amount of time", and at least if they do this sort of thing, they will leave logs (or lack of logs, rather) that can be scrutinized if need be.

I don't think we need to aim for absolute perfection when just the played time ban would be a huge improvement for a lot of situations.

Re: [BOUNTY] Played-time ban

Posted: Sun Aug 20, 2023 11:03 pm
by oranges
TypicalRig wrote: Sat Aug 19, 2023 10:39 pm Living connected hours isn't enough. We already have players that will SSD but stay connected and have SS13 semi-afk in the background with maybe their sounds on so they can check the game. There's no point in having this kind of ban if it can be easily bypassed. Let's maybe extend the code to check for actual ingame input every so and so minutes?
this is literally already how it works.

if you go afk you're set as afk and time stops accruing.