appcontext

package
v0.0.0-...-67f6788 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppContext

type AppContext struct {
	DB          db.DataPersister
	Rcon        quake3_rcon.Rcon
	UrtConfig   models.UrtConfig
	Players     models.Players
	Settings    ServerSettings
	Api         *api.Api
	VoteChannel chan models.Vote
	VoteActive  atomic.Bool
	Runs        models.RunsInfo
}

func (*AppContext) GetCurrentMap

func (c *AppContext) GetCurrentMap() string

func (*AppContext) GetMapList

func (c *AppContext) GetMapList() []string

func (*AppContext) GetMapWithCriteria

func (c *AppContext) GetMapWithCriteria(searchCriteria string) (uniqueMap *string, err error)

func (*AppContext) GetMapsMatching

func (c *AppContext) GetMapsMatching(searchCriteria string) []string

func (*AppContext) GetNextMap

func (c *AppContext) GetNextMap() string

func (*AppContext) GivePenCoin

func (c *AppContext) GivePenCoin(player models.Player) bool

func (*AppContext) Init

func (c *AppContext) Init()

func (*AppContext) InitPlayer

func (c *AppContext) InitPlayer(playerNumber string, guid string, name string, ip string) *models.Player

func (*AppContext) InitPlayerFromDump

func (c *AppContext) InitPlayerFromDump(playerNumber string, dump models.DumpPlayer) *models.Player

func (*AppContext) IsMapAlreadyDownloaded

func (c *AppContext) IsMapAlreadyDownloaded(mapname string) bool

func (*AppContext) MapSync

func (c *AppContext) MapSync()

func (*AppContext) NewVote

func (c *AppContext) NewVote(v models.Vote)

func (*AppContext) RconBigText

func (c *AppContext) RconBigText(text string, a ...any)

func (*AppContext) RconCommand

func (c *AppContext) RconCommand(text string, a ...any)

func (*AppContext) RconPrint

func (c *AppContext) RconPrint(text string, a ...any)

func (*AppContext) RconText

func (c *AppContext) RconText(isGlobal bool, playerId string, text string, a ...any)

func (*AppContext) ResolveMapWithIndex

func (c *AppContext) ResolveMapWithIndex(search string, indexStr string) (mapName string, candidates []string, err error)

func (*AppContext) SetMapList

func (c *AppContext) SetMapList()

func (*AppContext) SetMapName

func (c *AppContext) SetMapName(mapName string)

func (*AppContext) SetNextMap

func (c *AppContext) SetNextMap(nextMapName string)

func (*AppContext) UpdatePlayerAliases

func (c *AppContext) UpdatePlayerAliases(player *models.Player)

type CommandsArgs

type CommandsArgs struct {
	Context  *AppContext
	PlayerId string
	Params   []string
	IsGlobal bool
	Usage    string
}

func (*CommandsArgs) GetPlayerGuid

func (c *CommandsArgs) GetPlayerGuid() (guid string)

func (*CommandsArgs) RconBigText

func (c *CommandsArgs) RconBigText(text string, a ...any)

func (*CommandsArgs) RconCommand

func (c *CommandsArgs) RconCommand(command string, a ...any) (res string)

func (*CommandsArgs) RconCommandExtractValue

func (c *CommandsArgs) RconCommandExtractValue(command string, a ...any) string

func (*CommandsArgs) RconGlobalText

func (c *CommandsArgs) RconGlobalText(text string, a ...any)

func (*CommandsArgs) RconList

func (c *CommandsArgs) RconList(list []string)

func (*CommandsArgs) RconText

func (c *CommandsArgs) RconText(text string, a ...any)

func (*CommandsArgs) RconUsage

func (c *CommandsArgs) RconUsage()

func (*CommandsArgs) RconUsageWithText

func (c *CommandsArgs) RconUsageWithText(text string, a ...any)

func (*CommandsArgs) ResolveAdminTarget

func (c *CommandsArgs) ResolveAdminTarget(search string) (*models.Player, bool)

type RconFunction

type RconFunction func(format string, a ...any)

type ServerSettings

type ServerSettings struct {
	Mapname string
	Nextmap string
	Maplist []string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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