Documentation
¶
Index ¶
- type Client
- func (r *Client) BanPlayer(steamID uint64) error
- func (r *Client) Broadcast(message string) error
- func (r *Client) Close() error
- func (r *Client) DoExit() error
- func (r *Client) Info() (*ServerInfo, error)
- func (r *Client) KickPlayer(steamID uint64) error
- func (r *Client) Save() error
- func (r *Client) ShowPlayers() ([]Player, error)
- func (r *Client) Shutdown(seconds int) error
- func (r *Client) ShutdownWithMessage(seconds int, message string) error
- type Player
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client to a Palword RCON server. Only use NewClient to instantiate a client.
Available commands are documented at https://tech.palworldgame.com/settings-and-operation/commands#command-list. Not all commands listed there are applicable from RCON.
func NewClient ¶
NewClient creates a new Client with the given address and password. Note that this function does not attempt to connect to the RCON server, so the password is not validated at this time. Instead, the connection is established on-demand when a method on the Client is called.
func (*Client) BanPlayer ¶
KickPlayer instructs the server to ban the player with the given Steam ID from the server. The player must be online to be banned.
func (*Client) Close ¶
Close closes the connection to the RCON server. Calling any other method after closing will reopen the connection.
func (*Client) Info ¶
func (r *Client) Info() (*ServerInfo, error)
Info returns information about the server.
func (*Client) KickPlayer ¶
KickPlayer instructs the server to kick the player with the given Steam ID.
func (*Client) ShowPlayers ¶
ShowPlayers returns a list of all players that are currently online.
type ServerInfo ¶
ServerInfo represents the information about the server returned by Client.Info().