config

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2018 License: BSD-2-Clause Imports: 11 Imported by: 2

Documentation

Overview

Package config provides access to all of the tunable settings of a WolfMUD server. The default values can be overidden via a configuration file. The default name of the configuration file is config.wrj.

Users may specify an alternate path for the configuration file on the command line. As a fallback it will use the current directory. If the path does not specify a filename the default config.wrj will be used.

Index

Constants

This section is empty.

Variables

View Source
var Debug = struct {
	LongLog    bool // Long log with microseconds & filename?
	Panic      bool // Let goroutines panic and stop server?
	AllowDump  bool // Allow use of #DUMP command?
	AllowDebug bool // Allow use of #DEBUG command?
	Events     bool // Log events? - this can make the log quite noisy
	Things     bool // Log additional information for Thing?
}{
	LongLog:    false,
	Panic:      false,
	AllowDump:  false,
	AllowDebug: false,
	Events:     false,
	Things:     false,
}

Debugging configuration

View Source
var Inventory = struct {
	Compact   int // only compact if cap - len*2 > compact
	CrowdSize int // If inventory has more player than this it's a crowd
}{
	Compact:   4,
	CrowdSize: 10,
}

Inventory default configuration

View Source
var Login = struct {
	AccountLength  int
	PasswordLength int
	SaltLength     int
}{
	AccountLength:  10,
	PasswordLength: 10,
	SaltLength:     32,
}

Login default configuration

View Source
var Server = struct {
	Host           string        // Host for server to listen on
	Port           string        // Port for server to listen on
	Greeting       []byte        // Connection greeting
	IdleTimeout    time.Duration // Idle connection disconnect time
	MaxPlayers     int           // Max number of players allowed to login at once
	LogClient      bool          // Log connecting IP address and port of client?
	DataDir        string        // Main data directory
	SetPermissions bool          // Set permissions on created account files?
}{
	Host:           "127.0.0.1",
	Port:           "4001",
	Greeting:       []byte(""),
	IdleTimeout:    10 * time.Minute,
	MaxPlayers:     1024,
	DataDir:        ".",
	SetPermissions: false,
}

Server default configuration

View Source
var Stats = struct {
	Rate time.Duration // Stats collection and display rate
	GC   bool          // Run garbage collection before stat collection
}{
	Rate: 10 * time.Second,
	GC:   false,
}

Stats default configuration

Functions

This section is empty.

Types

This section is empty.

Source Files

  • config.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL