rcon

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deop added in v0.4.0

func Deop(remoteConsole Console, users []string) error

Deop removes users from the op list.

func ListWhitelist added in v0.6.0

func ListWhitelist(remoteConsole Console) ([]string, error)

ListWhitelist lists whitelisted users.

func NewConn added in v0.4.0

func NewConn(hostPort, password string) (*rcon.RemoteConsole, error)

NewConn creates a new RCON connection.

func Op added in v0.4.0

func Op(remoteConsole Console, users []string) error

Op adds users to the op list.

func Reload

func Reload(remoteConsole Console) error

Reload reloads the server.

func SaveAllFlush added in v0.7.0

func SaveAllFlush(remoteConsole Console) error

SaveAllFlush saves the server to disk.

func SaveOff added in v0.7.0

func SaveOff(remoteConsole Console) error

SaveOff disables the server auto-save.

func SaveOn added in v0.7.0

func SaveOn(remoteConsole Console) error

SaveOn enables the server auto-save.

func Whitelist added in v0.4.0

func Whitelist(remoteConsole Console, action string, users []string) error

Whitelist adds or removes users from the whitelist.

func WhitelistSwitch added in v0.4.0

func WhitelistSwitch(remoteConsole Console, enabled bool) error

WhitelistSwitch switches the whitelist on/off.

Types

type Console added in v0.7.0

type Console interface {
	Write(cmd string) (int, error)
	Read() (string, int, error)
}

Console is an interface for RCON client.

Jump to

Keyboard shortcuts

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