[Idea] Reject players between certain hours [opening_hours]

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

[Idea] Reject players between certain hours [opening_hours]

by texmex » Wed Feb 15, 2017 13:19

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?
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

helpless
Member
 
Posts: 49
Joined: Thu Jan 12, 2017 21:51
In-game: helpless

Re: [Idea] Reject players between certain hours [opening_hou

by helpless » Thu Feb 16, 2017 05:59

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.
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Idea] Reject players between certain hours [opening_hou

by texmex » Thu Feb 16, 2017 09:08

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.

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.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

WHY?

by Wuzzy » Thu Feb 16, 2017 18:12

WHY?
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: WHY?

by texmex » Thu Feb 16, 2017 19:04

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.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Idea] Reject players between certain hours [opening_hou

by Nathan.S » Fri Feb 17, 2017 13:27

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.
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Idea] Reject players between certain hours [opening_hou

by texmex » Fri Feb 17, 2017 14:41

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. =)
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

User avatar
GreenDimond
Member
 
Posts: 460
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: [Idea] Reject players between certain hours [opening_hou

by GreenDimond » Mon Feb 20, 2017 19:54

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.
I am Green. I tend to binge-post. "All of this over a 16x16 representation of a cartoon cat ?!?! what has this world come to..." -TenPlus1, 2017.
Diz mah mods! :D ↑ github.com/minetest/minetest_game/issues/1647#issuecomment-288134572 ↑
Sand Plus - Tac Nayn - Waffles - Coming Soon: Caverealms Plus
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Idea] Reject players between certain hours [opening_hou

by texmex » Tue Feb 21, 2017 10:18

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.

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.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Idea] Reject players between certain hours [opening_hou

by sofar » Tue Feb 21, 2017 22:10

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.
 

User avatar
texmex
Member
 
Posts: 226
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Idea] Reject players between certain hours [opening_hou

by texmex » Wed Feb 22, 2017 07:12

Thank you sofar, perhaps I may be able to dabble something together.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 75 guests

cron