Heyuri / kokonotsuba

Heyuri's BBS software
Other
19 stars 12 forks source link

Ban lengths should be more granular #59

Closed kaguy4 closed 10 months ago

kaguy4 commented 10 months ago

At least on Heyuri, sometimes 1 day long ban is too much for minor stuff. The "ideal" would be like on vichan where you can enter combinations like "1w3d12h" (1 week 3 days 12 hours) (it allows putting only "2d3h" or "3d" too). After splitting the string, it can find the integer of how many hours that is in total by multiplying "w" with 168, "d" with 24, and add "h" to that. You can take this a step further and add support for minutes as well actually (and calculate ban's length in minutes at the end instead of hours). Of course, you can just ask ChatGPT-san to generate a PHP function too (the challenge here probably isn't the conversion anyways).

...If that's not easy as it sounds to implement in practice, it can be simply in hours instead of days too.

So on adminban panel, it should either say "Expires (ex: 1w1d1h): (string goes here)", or if that's hard to implement, "Expires (hours): (integer goes here)"