rcon

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

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 .

func New

func New(c *config.Config) (*Client, error)

New .

func (*Client) BanPlayer

func (c *Client) BanPlayer(steamId string)

BanPlayer BAN该玩家

func (*Client) Broadcast

func (c *Client) Broadcast(message string)

Broadcast 广播

func (*Client) Close

func (c *Client) Close()

Close .

func (*Client) DoExit

func (c *Client) DoExit()

DoExit 强制关闭服务器

func (*Client) HandleMemoryUsage

func (c *Client) HandleMemoryUsage(threshold float64)

HandleMemoryUsage 发广播 重启维护

func (*Client) Info

func (c *Client) Info()

Info 展示服务器信息

func (*Client) KickPlayer

func (c *Client) KickPlayer(steamId string)

KickPlayer 下线该玩家

func (*Client) Save

func (c *Client) Save()

Save 存档

func (*Client) ShowPlayers

func (c *Client) ShowPlayers()

ShowPlayers 展示所有在线玩家

func (*Client) Shutdown

func (c *Client) Shutdown(seconds, message string)

Shutdown 通知玩家且 seconds 秒后关闭服务器

func (*Client) TeleportToMe

func (c *Client) TeleportToMe(steamId string)

TeleportToMe 将该玩家传送到自身所在地点

func (*Client) TeleportToPlayer

func (c *Client) TeleportToPlayer(steamId string)

TeleportToPlayer 传送到该玩家所在地点

type CmdName

type CmdName string

CmdName https://tech.palworldgame.com/server-commands

const (
	Shutdown         CmdName = "Shutdown"         // /Shutdown {Seconds} {MessageText}
	DoExit           CmdName = "DoExit"           // /DoExit
	Broadcast        CmdName = "Broadcast"        // /Broadcast {MessageText}
	KickPlayer       CmdName = "KickPlayer"       // /KickPlayer {SteamID}
	BanPlayer        CmdName = "BanPlayer"        // /BanPlayer {SteamID}
	TeleportToPlayer CmdName = "TeleportToPlayer" // /TeleportToPlayer {SteamID}
	TeleportToMe     CmdName = "TeleportToMe"     // /TeleportToMe {SteamID}
	ShowPlayers      CmdName = "ShowPlayers"      // /ShowPlayers
	Info             CmdName = "Info"             // /Info
	Save             CmdName = "Save"             // /Save
)

Jump to

Keyboard shortcuts

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