commands

package
v0.0.0-...-b0deb01 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(n game.NetState, line string)

Execute executes the command for the given command line

func RegisterCallbacks

func RegisterCallbacks(
	lGlobalChat func(uo.Hue, string, string),
	lSaveWorld func(),
	lBroadcast func(string, ...any),
	lShutdown func(),
	lLatestSavePath func() string,
)

RegisterCallbacks registers the various server callbacks required to execute certain commands.

Types

type CommandArgs

type CommandArgs []string

CommandArgs is a thin wrapper around a slice of command line arguments

func (CommandArgs) Int

func (c CommandArgs) Int(n int) int

Int returns argument n as an integer value, or the default

func (CommandArgs) String

func (c CommandArgs) String(n int) string

String returns argument n as a string value, or the default

Jump to

Keyboard shortcuts

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