cs2log

package module
v0.0.0-...-85eccca Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 7 Imported by: 2

README

cs2-log

Go package for parsing cs2 server logfiles. It exports types for cs2 logfiles, their regular expressions, a function for parsing and a function for converting to non-html-escaped JSON.

Usage

For more examples look at the tests and the command-line utility in examples folder. Have also a look at godoc.

package main

import (
	"fmt"

	"github.com/janstuemmel/cs2-log"
)

func main() {

	var msg cs2log.Message

	// a line from a server logfile
	line := `L 11/05/2018 - 15:44:36: "Player<12><[U:1:29384012]><CT>" purchased "m4a1"`

	// parse into Message
	msg, err := cs2log.Parse(line)

	if err != nil {
		panic(err)
	}

	fmt.Println(msg.GetType(), msg.GetTime().String())

	// cast Message interface to PlayerPurchase type
	playerPurchase, ok := msg.(cs2log.PlayerPurchase)

	if ok != true {
		panic("casting failed")
	}

	fmt.Println(playerPurchase.Player.SteamID, playerPurchase.Item)

	// get json non-htmlescaped
	jsn := cs2log.ToJSON(msg)

	fmt.Println(jsn)
}

Example JSON output:

{
  "time": "2018-11-05T15:44:36Z",
  "type": "PlayerPurchase",
  "player": {
    "name": "Player",
    "id": 12,
    "steam_id": "[U:1:29384012]",
    "side": "CT"
  },
  "item": "m4a1"
}

Documentation

Overview

Package cs2log provides utilities for parsing a counter-strike 2 server logfile. It exports types for cs2 logfiles, their regular expressions, a function for parsing and a function for converting to non-html-escaped JSON.

Look at the examples for Parse and ToJSON for usage instructions.

Index

Examples

Constants

View Source
const (
	// ServerMessagePattern regular expression
	ServerMessagePattern = `server_message: "(\w+)"`
	// FreezTimeStartPattern regular expression
	FreezTimeStartPattern = `Starting Freeze period`
	// WorldMatchStartPattern regular expression
	WorldMatchStartPattern = `World triggered "Match_Start" on "(\w+)"`
	// WorldRoundStartPattern regular expression
	WorldRoundStartPattern = `World triggered "Round_Start"`
	// WorldRoundRestartPattern regular expression
	WorldRoundRestartPattern = `World triggered "Restart_Round_\((\d+)_second\)`
	// WorldRoundEndPattern regular expression
	WorldRoundEndPattern = `World triggered "Round_End"`
	// WorldGameCommencingPattern regular expression
	WorldGameCommencingPattern = `World triggered "Game_Commencing"`
	// TeamScoredPattern regular expression
	TeamScoredPattern = `Team "(CT|TERRORIST)" scored "(\d+)" with "(\d+)" players`
	// TeamNoticePattern regular expression
	TeamNoticePattern = `Team "(CT|TERRORIST)" triggered "(\w+)" \(CT "(\d+)"\) \(T "(\d+)"\)`
	// PlayerConnectedPattern regular expression
	PlayerConnectedPattern = `"(.+)<(\d+)><([\[\]\w:]+)><>" connected, address "(.*)"`
	// PlayerDisconnectedPattern regular expression
	PlayerDisconnectedPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT|Unassigned|)>" disconnected \(reason "(.+)"\)`
	// PlayerEnteredPattern regular expression
	PlayerEnteredPattern = `"(.+)<(\d+)><([\[\]\w:]+)><>" entered the game`
	// PlayerBannedPattern regular expression
	PlayerBannedPattern = `Banid: "(.+)<(\d+)><([\[\]\w:]+)><\w*>" was banned "([\w. ]+)" by "(\w+)"`
	// PlayerSwitchedPattern regular expression
	PlayerSwitchedPattern = `"(.+)<(\d+)><([\[\]\w:]+)>" switched from team <(Unassigned|Spectator|TERRORIST|CT)> to <(Unassigned|Spectator|TERRORIST|CT)>`
	// PlayerSayPattern regular expression
	PlayerSayPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" say(_team)? "(.*)"`
	// PlayerPurchasePattern regular expression
	PlayerPurchasePattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" purchased "(\w+)"`
	// PlayerKillPattern regular expression
	PlayerKillPattern = `` /* 215-byte string literal not displayed */
	// PlayerKillAssistPattern regular expression
	PlayerKillAssistPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" assisted killing "(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>"`
	// PlayerAttackPattern regular expression
	PlayerAttackPattern = `` /* 270-byte string literal not displayed */
	// PlayerKilledBombPattern regular expression
	PlayerKilledBombPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" \[(-?\d+) (-?\d+) (-?\d+)\] was killed by the bomb\.`
	// PlayerKilledSuicidePattern regular expression
	PlayerKilledSuicidePattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" \[(-?\d+) (-?\d+) (-?\d+)\] committed suicide with "(.*)"`
	// PlayerPickedUpPattern regular expression
	PlayerPickedUpPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" picked up "(\w+)"`
	// PlayerDroppedPattern regular expression
	PlayerDroppedPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT|Unassigned)>" dropped "(\w+)"`
	// PlayerMoneyChangePattern regular expression
	PlayerMoneyChangePattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" money change (\d+)\+?(-?\d+) = \$(\d+) \(tracked\)( \(purchase: (\w+)\))?`
	// PlayerBombGotPattern regular expression
	PlayerBombGotPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" triggered "Got_The_Bomb"`
	// PlayerBombPlantedPattern regular expression
	PlayerBombPlantedPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" triggered "Planted_The_Bomb"`
	// PlayerBombDroppedPattern regular expression
	PlayerBombDroppedPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" triggered "Dropped_The_Bomb"`
	// PlayerBombBeginDefusePattern regular expression
	PlayerBombBeginDefusePattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" triggered "Begin_Bomb_Defuse_With(out)?_Kit"`
	// PlayerBombDefusedPattern regular expression
	PlayerBombDefusedPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" triggered "Defused_The_Bomb"`
	// PlayerThrewPattern regular expression
	PlayerThrewPattern = `"(.+)<(\d+)><([\[\]\w:]+)><(TERRORIST|CT)>" threw (\w+) \[(-?\d+) (-?\d+) (-?\d+)\]( flashbang entindex (\d+))?\)?`
	// PlayerBlindedPattern regular expression
	PlayerBlindedPattern = `` /* 141-byte string literal not displayed */
	// ProjectileSpawnedPattern regular expression
	ProjectileSpawnedPattern = `Molotov projectile spawned at (-?\d+\.\d+) (-?\d+\.\d+) (-?\d+\.\d+), velocity (-?\d+\.\d+) (-?\d+\.\d+) (-?\d+\.\d+)`
	// GameOverPattern regular expression
	GameOverPattern = `Game Over: (\w+) (\w+) (\w+) score (\d+):(\d+) after (\d+) min`
)

Variables

View Source
var DefaultPatterns = map[*regexp.Regexp]MessageFunc{
	regexp.MustCompile(ServerMessagePattern):         NewServerMessage,
	regexp.MustCompile(FreezTimeStartPattern):        NewFreezTimeStart,
	regexp.MustCompile(WorldMatchStartPattern):       NewWorldMatchStart,
	regexp.MustCompile(WorldRoundStartPattern):       NewWorldRoundStart,
	regexp.MustCompile(WorldRoundRestartPattern):     NewWorldRoundRestart,
	regexp.MustCompile(WorldRoundEndPattern):         NewWorldRoundEnd,
	regexp.MustCompile(WorldGameCommencingPattern):   NewWorldGameCommencing,
	regexp.MustCompile(TeamScoredPattern):            NewTeamScored,
	regexp.MustCompile(TeamNoticePattern):            NewTeamNotice,
	regexp.MustCompile(PlayerConnectedPattern):       NewPlayerConnected,
	regexp.MustCompile(PlayerDisconnectedPattern):    NewPlayerDisconnected,
	regexp.MustCompile(PlayerEnteredPattern):         NewPlayerEntered,
	regexp.MustCompile(PlayerBannedPattern):          NewPlayerBanned,
	regexp.MustCompile(PlayerSwitchedPattern):        NewPlayerSwitched,
	regexp.MustCompile(PlayerSayPattern):             NewPlayerSay,
	regexp.MustCompile(PlayerPurchasePattern):        NewPlayerPurchase,
	regexp.MustCompile(PlayerKillPattern):            NewPlayerKill,
	regexp.MustCompile(PlayerKillAssistPattern):      NewPlayerKillAssist,
	regexp.MustCompile(PlayerAttackPattern):          NewPlayerAttack,
	regexp.MustCompile(PlayerKilledBombPattern):      NewPlayerKilledBomb,
	regexp.MustCompile(PlayerKilledSuicidePattern):   NewPlayerKilledSuicide,
	regexp.MustCompile(PlayerPickedUpPattern):        NewPlayerPickedUp,
	regexp.MustCompile(PlayerDroppedPattern):         NewPlayerDropped,
	regexp.MustCompile(PlayerMoneyChangePattern):     NewPlayerMoneyChange,
	regexp.MustCompile(PlayerBombGotPattern):         NewPlayerBombGot,
	regexp.MustCompile(PlayerBombPlantedPattern):     NewPlayerBombPlanted,
	regexp.MustCompile(PlayerBombDroppedPattern):     NewPlayerBombDropped,
	regexp.MustCompile(PlayerBombBeginDefusePattern): NewPlayerBombBeginDefuse,
	regexp.MustCompile(PlayerBombDefusedPattern):     NewPlayerBombDefused,
	regexp.MustCompile(PlayerThrewPattern):           NewPlayerThrew,
	regexp.MustCompile(PlayerBlindedPattern):         NewPlayerBlinded,
	regexp.MustCompile(ProjectileSpawnedPattern):     NewProjectileSpawned,
	regexp.MustCompile(GameOverPattern):              NewGameOver,
}
View Source
var ErrorNoMatch = errors.New("no match")

ErrorNoMatch error when pattern is not matching

View Source
var LogLinePattern = regexp.MustCompile(`L (\d{2}\/\d{2}\/\d{4} - \d{2}:\d{2}:\d{2}): (.*)`)

LogLinePattern is the regular expression to capture a line of a logfile

Functions

func ToJSON

func ToJSON(m Message) string

ToJSON marshals messages to JSON without escaping html

Example
package main

import (
	"fmt"

	cs2log "github.com/janstuemmel/cs2-log"
)

func main() {

	// parse Message
	msg, _ := cs2log.Parse(`L 11/05/2018 - 15:44:36: "Player-Name<12><[U:1:29384012]><CT>" purchased "m4a1"`)

	// cast Message interface type to PlayerPurchase type
	playerPurchase, _ := msg.(cs2log.PlayerPurchase)

	fmt.Println(playerPurchase.Player.SteamID)
	fmt.Println(playerPurchase.Item)

	// get json non-html-escaped
	jsn := cs2log.ToJSON(msg)

	fmt.Println(jsn)
}
Output:

[U:1:29384012]
m4a1
{"time":"2018-11-05T15:44:36Z","type":"PlayerPurchase","player":{"name":"Player-Name","id":12,"steam_id":"[U:1:29384012]","side":"CT"},"item":"m4a1"}

Types

type Equation

type Equation struct {
	A      int `json:"a"`
	B      int `json:"b"`
	Result int `json:"result"`
}

Equation holds the parameters and result of a money change equation in the form A + B = Result

type FreezTimeStart

type FreezTimeStart struct{ Meta }

FreezTimeStart is received before each round

type GameOver

type GameOver struct {
	Meta
	Mode     string `json:"mode"`
	MapGroup string `json:"map_group"`
	Map      string `json:"map"`
	ScoreCT  int    `json:"score_ct"`
	ScoreT   int    `json:"score_t"`
	Duration int    `json:"duration"`
}

GameOver is received when a team won and the game ends

type Message

type Message interface {
	GetType() string
	GetTime() time.Time
}

Message is the interface for all messages

func NewFreezTimeStart

func NewFreezTimeStart(ti time.Time, r []string) Message

func NewGameOver

func NewGameOver(ti time.Time, r []string) Message

func NewPlayerAttack

func NewPlayerAttack(ti time.Time, r []string) Message

func NewPlayerBanned

func NewPlayerBanned(ti time.Time, r []string) Message

func NewPlayerBlinded

func NewPlayerBlinded(ti time.Time, r []string) Message

func NewPlayerBombBeginDefuse

func NewPlayerBombBeginDefuse(ti time.Time, r []string) Message

func NewPlayerBombDefused

func NewPlayerBombDefused(ti time.Time, r []string) Message

func NewPlayerBombDropped

func NewPlayerBombDropped(ti time.Time, r []string) Message

func NewPlayerBombGot

func NewPlayerBombGot(ti time.Time, r []string) Message

func NewPlayerBombPlanted

func NewPlayerBombPlanted(ti time.Time, r []string) Message

func NewPlayerConnected

func NewPlayerConnected(ti time.Time, r []string) Message

func NewPlayerDisconnected

func NewPlayerDisconnected(ti time.Time, r []string) Message

func NewPlayerDropped

func NewPlayerDropped(ti time.Time, r []string) Message

func NewPlayerEntered

func NewPlayerEntered(ti time.Time, r []string) Message

func NewPlayerKill

func NewPlayerKill(ti time.Time, r []string) Message

func NewPlayerKillAssist

func NewPlayerKillAssist(ti time.Time, r []string) Message

func NewPlayerKilledBomb

func NewPlayerKilledBomb(ti time.Time, r []string) Message

func NewPlayerKilledSuicide

func NewPlayerKilledSuicide(ti time.Time, r []string) Message

func NewPlayerMoneyChange

func NewPlayerMoneyChange(ti time.Time, r []string) Message

func NewPlayerPickedUp

func NewPlayerPickedUp(ti time.Time, r []string) Message

func NewPlayerPurchase

func NewPlayerPurchase(ti time.Time, r []string) Message

func NewPlayerSay

func NewPlayerSay(ti time.Time, r []string) Message

func NewPlayerSwitched

func NewPlayerSwitched(ti time.Time, r []string) Message

func NewPlayerThrew

func NewPlayerThrew(ti time.Time, r []string) Message

func NewProjectileSpawned

func NewProjectileSpawned(ti time.Time, r []string) Message

func NewServerMessage

func NewServerMessage(ti time.Time, r []string) Message

func NewTeamNotice

func NewTeamNotice(ti time.Time, r []string) Message

func NewTeamScored

func NewTeamScored(ti time.Time, r []string) Message

func NewUnknown

func NewUnknown(ti time.Time, r []string) Message

func NewWorldGameCommencing

func NewWorldGameCommencing(ti time.Time, r []string) Message

func NewWorldMatchStart

func NewWorldMatchStart(ti time.Time, r []string) Message

func NewWorldRoundEnd

func NewWorldRoundEnd(ti time.Time, r []string) Message

func NewWorldRoundRestart

func NewWorldRoundRestart(ti time.Time, r []string) Message

func NewWorldRoundStart

func NewWorldRoundStart(ti time.Time, r []string) Message

func Parse

func Parse(line string) (Message, error)

Parse parses a plain log message and returns message type or error if there's no match

Example
package main

import (
	"fmt"

	cs2log "github.com/janstuemmel/cs2-log"
)

func main() {

	var msg cs2log.Message

	// a line from a server logfile
	line := `L 11/05/2018 - 15:44:36: "Player-Name<12><[U:1:29384012]><CT>" purchased "m4a1"`

	// parse Message
	msg, _ = cs2log.Parse(line)

	fmt.Println(msg.GetType())
	fmt.Println(msg.GetTime().String())
}
Output:

PlayerPurchase
2018-11-05 15:44:36 +0000 UTC

func ParseWithPatterns

func ParseWithPatterns(line string, patterns map[*regexp.Regexp]MessageFunc) (Message, error)

Parse attempts to match a plain log message against the map of provided patterns, if the line matches a key from the map, the corresponding MessageFunc is called on the line to parse it into a Message

type MessageFunc

type MessageFunc func(ti time.Time, r []string) Message

type Meta

type Meta struct {
	Time time.Time `json:"time"`
	Type string    `json:"type"`
}

Meta holds time and type of a log message

func NewMeta

func NewMeta(ti time.Time, ty string) Meta

func (Meta) GetTime

func (m Meta) GetTime() time.Time

GetTime is the getter for Meta.Time

func (Meta) GetType

func (m Meta) GetType() string

GetType is the getter fo Meta.Type

type Player

type Player struct {
	Name    string `json:"name"`
	ID      int    `json:"id"`
	SteamID string `json:"steam_id"`
	Side    string `json:"side"`
}

Player holds the information about a player known from log

type PlayerAttack

type PlayerAttack struct {
	Meta
	Attacker         Player   `json:"attacker"`
	AttackerPosition Position `json:"attacker_pos"`
	Victim           Player   `json:"victim"`
	VictimPosition   Position `json:"victim_pos"`
	Weapon           string   `json:"weapon"`
	Damage           int      `json:"damage"`
	DamageArmor      int      `json:"damage_armor"`
	Health           int      `json:"health"`
	Armor            int      `json:"armor"`
	Hitgroup         string   `json:"hitgroup"`
}

PlayerAttack is recieved when a player attacks another

type PlayerBanned

type PlayerBanned struct {
	Meta
	Player   Player `json:"player"`
	Duration string `json:"duration"`
	By       string `json:"by"`
}

PlayerBanned is received when a player gots banned from the server

type PlayerBlinded

type PlayerBlinded struct {
	Meta
	Attacker Player  `json:"attacker"`
	Victim   Player  `json:"victim"`
	For      float32 `json:"for"`
	Entindex int     `json:"entindex"`
}

PlayerBlinded is received when a player got blinded

type PlayerBombBeginDefuse

type PlayerBombBeginDefuse struct {
	Meta
	Player Player `json:"player"`
	Kit    bool   `json:"kit"`
}

PlayerBombBeginDefuse is received when a player begins defusing the bomb

type PlayerBombDefused

type PlayerBombDefused struct {
	Meta
	Player Player `json:"player"`
}

PlayerBombDefused is received when a player defused the bomb

type PlayerBombDropped

type PlayerBombDropped struct {
	Meta
	Player Player `json:"player"`
}

PlayerBombDropped is received when a player drops the bomb

type PlayerBombGot

type PlayerBombGot struct {
	Meta
	Player Player `json:"player"`
}

PlayerBombGot is received when a player picks up the bomb

type PlayerBombPlanted

type PlayerBombPlanted struct {
	Meta
	Player Player `json:"player"`
}

PlayerBombPlanted is received when a player plants the bomb

type PlayerConnected

type PlayerConnected struct {
	Meta
	Player  Player `json:"player"`
	Address string `json:"address"`
}

PlayerConnected message is received when a player connects and holds the address from where the player is connecting

type PlayerDisconnected

type PlayerDisconnected struct {
	Meta
	Player Player `json:"player"`
	Reason string `json:"reason"`
}

PlayerDisconnected is received when a player disconnets and holds the reason why the player left

type PlayerDropped

type PlayerDropped struct {
	Meta
	Player Player `json:"player"`
	Item   string `json:"item"`
}

PlayerDropped is recieved when a player drops an item

type PlayerEntered

type PlayerEntered struct {
	Meta
	Player Player `json:"player"`
}

PlayerEntered is received when a player enters the game

type PlayerKill

type PlayerKill struct {
	Meta
	Attacker         Player   `json:"attacker"`
	AttackerPosition Position `json:"attacker_pos"`
	Victim           Player   `json:"victim"`
	VictimPosition   Position `json:"victim_pos"`
	Weapon           string   `json:"weapon"`
	Headshot         bool     `json:"headshot"`
	Penetrated       bool     `json:"penetrated"`
}

PlayerKill is received when a player kills another

type PlayerKillAssist

type PlayerKillAssist struct {
	Meta
	Attacker Player `json:"attacker"`
	Victim   Player `json:"victim"`
}

PlayerKillAssist is received when a player assisted killing another

type PlayerKilledBomb

type PlayerKilledBomb struct {
	Meta
	Player   Player   `json:"player"`
	Position Position `json:"pos"`
}

PlayerKilledBomb is received when a player is killed by the bomb

type PlayerKilledSuicide

type PlayerKilledSuicide struct {
	Meta
	Player   Player   `json:"player"`
	Position Position `json:"pos"`
	With     string   `json:"with"`
}

PlayerKilledSuicide is received when a player commited suicide

type PlayerMoneyChange

type PlayerMoneyChange struct {
	Meta
	Player   Player   `json:"player"`
	Equation Equation `json:"equation"`
	Purchase string   `json:"purchase"`
}

PlayerMoneyChange is received when a player loses or receives money TODO: add before +-money

type PlayerPickedUp

type PlayerPickedUp struct {
	Meta
	Player Player `json:"player"`
	Item   string `json:"item"`
}

PlayerPickedUp is received when a player picks up an item

type PlayerPurchase

type PlayerPurchase struct {
	Meta
	Player Player `json:"player"`
	Item   string `json:"item"`
}

PlayerPurchase holds info about which player bought an item

type PlayerSay

type PlayerSay struct {
	Meta
	Player Player `json:"player"`
	Text   string `json:"text"`
	Team   bool   `json:"team"`
}

PlayerSay is received when a player writes into chat

type PlayerSwitched

type PlayerSwitched struct {
	Meta
	Player Player `json:"player"`
	From   string `json:"from"`
	To     string `json:"to"`
}

PlayerSwitched is received when a player switches sides

type PlayerThrew

type PlayerThrew struct {
	Meta
	Player   Player   `json:"player"`
	Position Position `json:"pos"`
	Entindex int      `json:"entindex"`
	Grenade  string   `json:"grenade"`
}

PlayerThrew is received when a player threw a grenade

type Position

type Position struct {
	X int `json:"x"`
	Y int `json:"y"`
	Z int `json:"z"`
}

Position holds the coords for a event happend on the map

type PositionFloat

type PositionFloat struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
	Z float32 `json:"z"`
}

PositionFloat holds more exact coords

type ProjectileSpawned

type ProjectileSpawned struct {
	Meta
	Position PositionFloat `json:"pos"`
	Velocity Velocity      `json:"velocity"`
}

ProjectileSpawned is received when a molotov spawned

type ServerMessage

type ServerMessage struct {
	Meta
	Text string `json:"text"`
}

ServerMessage is received on a server event

type TeamNotice

type TeamNotice struct {
	Meta
	Side    string `json:"side"`
	Notice  string `json:"notice"`
	ScoreCT int    `json:"score_ct"`
	ScoreT  int    `json:"score_t"`
}

TeamNotice message is received at the end of a round and holds information about which team won the round and the score

type TeamScored

type TeamScored struct {
	Meta
	Side       string `json:"side"`
	Score      int    `json:"score"`
	NumPlayers int    `json:"num_players"`
}

TeamScored is received at the end of each round and holds the scores for a team

type Unknown

type Unknown struct {
	Meta
	Raw string `json:"raw"`
}

Unknown holds the raw log message of a message that is not defined in patterns but starts with time

type Velocity

type Velocity struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
	Z float32 `json:"z"`
}

Velocity holds information about the velocity of a projectile

type WorldGameCommencing

type WorldGameCommencing struct{ Meta }

WorldGameCommencing message is received when a game is commencing

type WorldMatchStart

type WorldMatchStart struct {
	Meta
	Map string `json:"map"`
}

WorldMatchStart holds the map wich will be played when match starts

type WorldRoundEnd

type WorldRoundEnd struct{ Meta }

WorldRoundEnd message is received when a round ends

type WorldRoundRestart

type WorldRoundRestart struct {
	Meta
	Timeleft int `json:"timeleft"`
}

WorldRoundRestart is received when the server wants to restart a round

type WorldRoundStart

type WorldRoundStart struct{ Meta }

WorldRoundStart message is received when a new round starts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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