config

package
v0.0.0-...-b1f961f Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Port int
}

Channel holds the channel server config.

type Config

type Config struct {
	HostIP  string `mapstructure:"host_ip"`
	BinPath string `mapstructure:"bin_path"`
	DevMode bool

	DevModeOptions DevModeOptions
	Discord        Discord
	Database       Database
	Launcher       Launcher
	Sign           Sign
	Channel        Channel
	Entrance       Entrance
}

Config holds the global server-wide config.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the given config toml file.

type Database

type Database struct {
	Host     string
	Port     int
	User     string
	Password string
	Database string
}

Database holds the postgres database config.

type DevModeOptions

type DevModeOptions struct {
	CleanDB             bool // Automatically wipes the DB on server reset.
	MaxLauncherHR       bool // Sets the HR returned in the launcher to HR9 so that you can join non-beginner worlds.
	FixedStageID        bool // Causes all move_stage to use the ID sl1Ns200p0a0u0 to get you into all stages
	LogOutboundMessages bool // Log all messages sent to the clients
	SaveDumps           SaveDumpOptions
}

DevModeOptions holds various debug/temporary options for use while developing Erupe.

type Discord

type Discord struct {
	Enabled   bool
	BotToken  string
	ChannelID string
}

Discord holds the discord integration config.

type Entrance

type Entrance struct {
	Port    uint16
	Entries []EntranceServerInfo
}

Entrance holds the entrance server config.

type EntranceChannelInfo

type EntranceChannelInfo struct {
	Port           uint16
	MaxPlayers     uint16
	CurrentPlayers uint16
	Unk4           uint16
	Unk5           uint16
	Unk6           uint16
	Unk7           uint16
	Unk8           uint16
	Unk9           uint16
	Unk10          uint16
	Unk11          uint16
	Unk12          uint16
	Unk13          uint16
}

EntranceChannelInfo represents an entry in a server's channel list.

type EntranceServerInfo

type EntranceServerInfo struct {
	IP     string
	Unk2   uint16
	Type   uint8  // Server type. 0=?, 1=open, 2=cities, 3=newbie, 4=bar
	Season uint8  // Server activity. 0 = green, 1 = orange, 2 = blue
	Unk6   uint8  // Something to do with server recommendation on 0, 3, and 5.
	Name   string // Server name, 66 byte null terminated Shift-JIS(JP) or Big5(TW).

	// 4096(PC, PS3/PS4)?, 8258(PC, PS3/PS4)?, 8192 == nothing?
	// THIS ONLY EXISTS IF Binary8Header.type == "SV2", NOT "SVR"!
	AllowedClientFlags uint32

	Channels []EntranceChannelInfo
}

EntranceServerInfo represents an entry in the serverlist.

type Launcher

type Launcher struct {
	Port                     int
	UseOriginalLauncherFiles bool
}

Launcher holds the launcher server config.

type SaveDumpOptions

type SaveDumpOptions struct {
	Enabled   bool
	OutputDir string
}

type Sign

type Sign struct {
	Port int
}

Sign holds the sign server config.

Jump to

Keyboard shortcuts

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