Allow the server tick to be customised
This commit is contained in:
parent
573bfbf9c7
commit
c6fbf1341a
2 changed files with 30 additions and 12 deletions
|
@ -17,6 +17,7 @@ var ver = flag.Bool("version", false, "Display version number")
|
|||
var quit = flag.Int("quit", 0, "Quit after n seconds, useful for testing")
|
||||
var address = flag.String("address", "", "The address to host on, automatically selected if empty")
|
||||
var data = flag.String("data", "", "Directory to store persistant data, no storage if empty")
|
||||
var tick = flag.Int("tick", 30, "Number of minutes per server tick (0 for no tick)")
|
||||
|
||||
func InnerMain() {
|
||||
flag.Parse()
|
||||
|
@ -35,7 +36,8 @@ func InnerMain() {
|
|||
// Create the server data
|
||||
s := server.NewServer(
|
||||
server.OptionAddress(*address),
|
||||
server.OptionPersistentData())
|
||||
server.OptionPersistentData(),
|
||||
server.OptionTick(*tick))
|
||||
|
||||
// Initialise the server
|
||||
if err := s.Initialise(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue