[Idea] Reject players between certain hours [opening_hours]
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
[Idea] Reject players between certain hours [opening_hours]
For servers, I want to be able to schedule hours and weekdays where the server accepts player joins and hours where it rejects them.
For more flexible use, the mod would accept configuration from both "inclusive" and "exclusive" approaches. That is, the user would either
• specify opening hours of the server (the rest of the time it rejects players) or
• specify closing hours (the rest of the time it accepts players). Perhaps those could be combined, even.
The mod could be made to optionally
• broadcast messages when approacing closing hours
• kick players when closing hours comes in effect
For join rejection code there's already the Whitelist mod to look to.
Thoughts?
For more flexible use, the mod would accept configuration from both "inclusive" and "exclusive" approaches. That is, the user would either
• specify opening hours of the server (the rest of the time it rejects players) or
• specify closing hours (the rest of the time it accepts players). Perhaps those could be combined, even.
The mod could be made to optionally
• broadcast messages when approacing closing hours
• kick players when closing hours comes in effect
For join rejection code there's already the Whitelist mod to look to.
Thoughts?
Re: [Idea] Reject players between certain hours [opening_hou
Cool idea. But you need to remember, if it's 0300 were you live, it may be 1500 were somebody else lives, and this is an international game.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Idea] Reject players between certain hours [opening_hou
True that! Informing players of that will be key. But for maintenance and other tasks, admins may still need to shut players out at some point. This would also be useful for private servers for people's kids, limiting access.helpless wrote:Cool idea. But you need to remember, if it's 0300 were you live, it may be 1500 were somebody else lives, and this is an international game.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: WHY?
Wuzzy wrote:WHY?
But for maintenance and other tasks, admins may still need to shut players out at some point. This would also be useful for private servers for people's kids, limiting access.
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: [Idea] Reject players between certain hours [opening_hou
Couldn't you just shut down the server and accomplish the same thing?
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Idea] Reject players between certain hours [opening_hou
I can, that is what I do now using cron. But I notice that certain mechanisms in-world such as furnaces and hoppers needs to be manually restarted after each server start. Also I'd like to be able to have certain areas always loaded in the future.
Perhaps there's an entirely different approach to this. If anyone has it I'd like to hear it. =)
Perhaps there's an entirely different approach to this. If anyone has it I'd like to hear it. =)
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: [Idea] Reject players between certain hours [opening_hou
The removal of players is easy. Just kick them all.
You have already found a way of keeping players out it seems.
As for timing....is there not a RTC or something in digilines? Having a realtime clock that is set to your time could activate command blocks to do stuff at certain times. I dunno.
You have already found a way of keeping players out it seems.
As for timing....is there not a RTC or something in digilines? Having a realtime clock that is set to your time could activate command blocks to do stuff at certain times. I dunno.
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Idea] Reject players between certain hours [opening_hou
But I don't use digilines, I use basic hoppers and furnaces. I'd like to be able to have chunks loaded for visual reasons also. If I could autoload chunks on server launch or increase the number of chunks around a player that is loaded, that would solve half the problem.GreenDimond wrote:The removal of players is easy. Just kick them all.
You have already found a way of keeping players out it seems.
As for timing....is there not a RTC or something in digilines? Having a realtime clock that is set to your time could activate command blocks to do stuff at certain times. I dunno.
Re: [Idea] Reject players between certain hours [opening_hou
This shouldn't be too hard to implement:
- os.time() is available in lua and gets you the real clock time
- you can easily capture joining players (minetest.register_on_joinplayer()
- kicking players can be done: minetest.kick_player()
so all you'd have to do is run a function once in a while (every minute or so would suffice) that would remove all normal players and leave admins (by for instance checking for certain privs)
Then I'd add a nice announcement message 15, 10, 5 and 1 minute before the closing time so players know that they're going to get kicked.
When in closing time, just kick the players immediately after login.
- os.time() is available in lua and gets you the real clock time
- you can easily capture joining players (minetest.register_on_joinplayer()
- kicking players can be done: minetest.kick_player()
so all you'd have to do is run a function once in a while (every minute or so would suffice) that would remove all normal players and leave admins (by for instance checking for certain privs)
Then I'd add a nice announcement message 15, 10, 5 and 1 minute before the closing time so players know that they're going to get kicked.
When in closing time, just kick the players immediately after login.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Idea] Reject players between certain hours [opening_hou
Thank you sofar, perhaps I may be able to dabble something together.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Idea] Reject players between certain hours [opening_hou
The need for this mod in comparison to just schedule server uptime via cron is also actualized by bugs like these.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Idea] Reject players between certain hours [opening_hou
I'm actually writing this mod currently. Skills has been acquired. :)
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Who is online
Users browsing this forum: Bing [Bot] and 5 guests