srcon

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: MIT Imports: 7 Imported by: 0

README

stationeersrcon

A cli to the stationeers rcon for Stationeers dedicated servers.

usage: srcon [<flags>] <command> [<args> ...]

a CLI interface to Stationeers dedicated server RCON.

Flags:
  -h, --help               Show context-sensitive help (also try --help-long and --help-man).
  -c, --config=CONFIG      Path to a json configuration file for the tool.
      --ip=IP              Server IP to connect to.
      --port=PORT          Port to connect to
      --password=PASSWORD  Password to use for the RCON command.

Commands:
  help [<command>...]
    Show help.

  status
    Fetch the status of the Stationeers server.

  save <savefile>
    Saves the game to a specified file.

  shutdown [<flags>]
    Shutdowns the server

  notice <message>
    Sends a notice to all players

  ban <steamId> <timeout>
    Bans a player for a specific time.

  unban <steamID>
    Remove a player from the ban list.

  kick <steamID>
    Kick player from the server.

  clearall
    Delete disconnected players from the server.

  hungerRate <rate>
    Set the hungerRate on the server to the given number.

Building and Installing

go get ./...
go install ./...

This will build and install the binary into your $GOBIN directory. This could be copied anywhere in your path.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	// contains filtered or unexported fields
}

Client is a handle to a Stationeers rcon server.

func New

func New(hostName string, port int) *Client

New will create a new connection handle for connecting to a Stationeers RCON server.

func (*Client) Ban

func (c *Client) Ban(player string, timeout int) (string, error)

Ban a given player for a timeout number of seconds.

func (*Client) ClearAll

func (c *Client) ClearAll() (string, error)

ClearAll disconnected players.

func (*Client) Exec

func (c *Client) Exec(command string) (string, error)

Exec executes a command on the stationeers RCON.

func (*Client) HungerRate

func (c *Client) HungerRate(rate int) (string, error)

HungerRate sets the global hunger rate for the server.

func (*Client) Kick

func (c *Client) Kick(player string) (string, error)

Kick a given player.

func (*Client) Login

func (c *Client) Login(rconPassword string) error

Login to the stationeers rcon server.

func (*Client) Notice

func (c *Client) Notice(message string) (string, error)

Notice sends a message to all connected clients.

func (*Client) Save

func (c *Client) Save(file string) (string, error)

Save saves the game to the given file.

func (*Client) Shutdown

func (c *Client) Shutdown(message string, timeout int) (string, error)

Shutdown terminates the stationeers server immediately.

func (*Client) Status

func (c *Client) Status() (string, error)

Status fetches the status of the stationeers server.

func (*Client) Unban

func (c *Client) Unban(player string) (string, error)

Unban a given player.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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