qclient

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientNames added in v0.1.65

func ClientNames(clients []Client) []string

Types

type Client

type Client struct {
	Name   qstring.QuakeString `json:"name"`
	Team   qstring.QuakeString `json:"team"`
	Skin   string              `json:"skin"`
	Colors [2]uint8            `json:"colors"`
	Frags  int                 `json:"frags"`
	Ping   int                 `json:"ping"`
	Time   int                 `json:"time"`
	CC     string              `json:"cc"`
}

func NewFromLastStatsPlayer added in v0.3.0

func NewFromLastStatsPlayer(player laststats.Player) Client

func NewFromString

func NewFromString(clientString string) (Client, error)

func NewFromStrings

func NewFromStrings(clientStrings []string) []Client

func SortPlayers added in v0.1.35

func SortPlayers(players []Client) []Client

func SortPlayersByFrags added in v0.2.4

func SortPlayersByFrags(players []Client) []Client

func SortPlayersByName added in v0.2.4

func SortPlayersByName(players []Client) []Client

func SortPlayersByTeamName added in v0.2.4

func SortPlayersByTeamName(players []Client) []Client

func (Client) IsBot

func (client Client) IsBot() bool

func (Client) IsHuman added in v0.1.76

func (client Client) IsHuman() bool

func (Client) IsPlayer added in v0.1.39

func (client Client) IsPlayer() bool

func (Client) IsSpectator added in v0.1.10

func (client Client) IsSpectator() bool

func (Client) MarshalJSON added in v0.1.21

func (client Client) MarshalJSON() ([]byte, error)

type ClientExport added in v0.1.21

type ClientExport struct {
	Name      qstring.QuakeString `json:"name"`
	NameColor string              `json:"name_color"`
	Team      qstring.QuakeString `json:"team"`
	TeamColor string              `json:"team_color"`
	Skin      string              `json:"skin"`
	Colors    [2]uint8            `json:"colors"`
	Frags     int                 `json:"frags"`
	Ping      int                 `json:"ping"`
	Time      int                 `json:"time"`
	CC        string              `json:"cc"`
	IsBot     bool                `json:"is_bot"`
}

func Export added in v0.1.21

func Export(client Client) ClientExport

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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