Hello, mod concept is great, I'd like clarification on the following line:
"If the player disconnects while still within the limit the counter for that player is paused and resumed when the player reconnects."
Here's the setup, a player has a time limit of 2 hours of playime. The refresh is 8 hours.
Our players joins, plays 1 hour and 50 minutes, leaves. Then he comes back after six hours of general unrelated activity to play some Minetest, logs in, and is limited to 10 minutes of playtime, and then has to wait for another 8 hours for their playtime to reset.
Is this correct? I think this may be unwanted behaviour, just a thought.
On rejoin it is checked if the current timestamp is larger than the previous start timestamp and the playtime reset interval. In this case the start timestamp is replaced with the current timestamp and the playtime counter is reset.
So players only lose their "leftover playtime" from the previous interval if they reconnect after the interval is over. They can directly start playing for whatever playtime limit was set for them.
Hello, mod concept is great, I'd like clarification on the following line: "If the player disconnects while still within the limit the counter for that player is paused and resumed when the player reconnects."
Here's the setup, a player has a time limit of 2 hours of playime. The refresh is 8 hours. Our players joins, plays 1 hour and 50 minutes, leaves. Then he comes back after six hours of general unrelated activity to play some Minetest, logs in, and is limited to 10 minutes of playtime, and then has to wait for another 8 hours for their playtime to reset.
Is this correct? I think this may be unwanted behaviour, just a thought.
Great mod, I find it cool in concept.
Hi, I'm glad you like the mod.
On rejoin it is checked if the current timestamp is larger than the previous start timestamp and the playtime reset interval. In this case the start timestamp is replaced with the current timestamp and the playtime counter is reset.
So players only lose their "leftover playtime" from the previous interval if they reconnect after the interval is over. They can directly start playing for whatever playtime limit was set for them.
Ah I see! That's nice, thanks for solving my question Linuxdirk
Keep it up