[Mod] Set specific opening hours of a server [opening_hours]

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

[Mod] Set specific opening hours of a server [opening_hours]

by texmex » Tue Jul 25, 2017 12:34

Image

License: LGPLv3

Description
Limits the days and hours a server is open to players.

List of features
  • Allows players to join according to the opening.days and opening.hours table
  • Kicks players when opening hours are over
  • Warns players of closing 15, 10, 5 and 1 minute in advance
  • Always allows admin, singleplayer and players with server privilege to join and stay
Known issues
  • Opening times can't be set by global settings, code edits required
Bug reports and suggestions
You can report bugs or suggest ideas by filing an issue.

Links
Last edited by texmex on Thu Jun 14, 2018 10:43, edited 1 time in total.
 

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

Re: [Mod] Set specific opening hours of a server [opening_ho

by texmex » Tue Jul 25, 2017 12:48

I want to extend my thanks to sofar for guidance when conceptualizing this mod.
 

slemon
Member
 
Posts: 100
Joined: Sun Apr 27, 2014 03:56
 

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

Re: [Mod] Set specific opening hours of a server [opening_ho

by sofar » Tue Jul 25, 2017 19:16

texmex wrote:I want to extend my thanks to sofar for guidance when conceptualizing this mod.


Good job, the feature set on this mod look nice and complete, and I think this will actually be used a lot more by server owners to schedule downtime and regular reboots.

A big thumbs up from me.
 

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

Re: [Mod] Set specific opening hours of a server [opening_ho

by GreenDimond » Tue Jul 25, 2017 19:25

slemon wrote:What are the use cases?

  • Maintenance
  • Restarts
  • More time to fit stuff in between restarts
  • Take a break and go outside
  • Open only when admin can be on (closed when admin is asleep)
  • I am sure there are plenty more cases where this can be used.

:+1: This will be helpful for many server owners
My YuTube channel | I moderate the HOMETOWN Server. | Click here to see my (5) mods!
 

User avatar
AndroBuilder
Member
 
Posts: 51
Joined: Mon Dec 04, 2017 11:34
In-game: AndroBuilder

Re: [Mod] Set specific opening hours of a server [opening_ho

by AndroBuilder » Wed Jan 10, 2018 13:41

How do i set those opening hours and days? In which file? Example maybe ...

Thanks a lot great tool
 

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

Re: [Mod] Set specific opening hours of a server [opening_ho

by sofar » Wed Jan 10, 2018 19:23

AndroBuilder wrote:How do i set those opening hours and days? In which file? Example maybe ...

Thanks a lot great tool


Currently it's done by modifying `init.lua` and changing the table at the top.
 

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

Re: [Mod] Set specific opening hours of a server [opening_ho

by texmex » Thu Jan 11, 2018 14:59

sofar wrote:Currently it's done by modifying `init.lua` and changing the table at the top.

Exactly.

PRs for in-menu config solution welcome ofc. Not sure how to structure a settings variable for this purpose though, since it has so many options.
 


Return to WIP Mods



Who is online

Users browsing this forum: gpcf, runs and 3 guests