Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigName(mapName string, lobbyType format.Format, ruleset string) (string, error)
- func CreateDB()
- func DeleteServer(id uint)
- func ExecFile(path string, rcon *tf2rcon.TF2RconConnection) error
- func FormatConfigName(lobbyType format.Format) string
- func ResetReportCount(target string, lobbyID uint) error
- func SetServer(id uint, s *Server)
- func StartListener()
- type Event
- type Server
- func (s *Server) CVarChange(variable string, value string)
- func (s *Server) GameOver()
- func (s *Server) GetPlayers() ([]TF2RconWrapper.Player, error)
- func (s *Server) KickAll() error
- func (s *Server) KickPlayer(commID string, reason string) error
- func (s *Server) PlayerConnected(data TF2RconWrapper.PlayerData)
- func (s *Server) PlayerDisconnected(data TF2RconWrapper.PlayerData)
- func (s *Server) PlayerGlobalMessage(data TF2RconWrapper.PlayerData, text string)
- func (s *Server) RconCommand(_, command string)
- func (s *Server) Reset(changeMap bool)
- func (s *Server) Say(text string) error
- func (s *Server) Setup() error
- func (s *Server) StartVerifier(ticker *time.Ticker)
- func (s *Server) StopListening()
- func (s *Server) TournamentStarted()
- func (s *Server) Verify() bool
Constants ¶
View Source
const ( PlayerDisconnected string = "playerDisc" PlayerSubstituted string = "playerSub" PlayerConnected string = "playerConn" PlayerChat string = "playerChat" DisconnectedFromServer string = "discFromServer" MatchEnded string = "matchEnded" Test string = "test" ReservationOver string = "reservationOver" PlayersList string = "playersList" )
Variables ¶
View Source
var ErrInvalidMap = errors.New("Invalid Map Name.")
View Source
var (
ErrNoServer = errors.New("Server doesn't exist.")
)
View Source
var (
Listener *TF2RconWrapper.Listener
)
Functions ¶
func ConfigName ¶
func DeleteServer ¶
func DeleteServer(id uint)
func ExecFile ¶
func ExecFile(path string, rcon *tf2rcon.TF2RconConnection) error
Execute file located at path on rcon TODO: Shouldn't this be in TF2RconWrapper?
func FormatConfigName ¶
func ResetReportCount ¶
ResetReportCount resets the !rep count for the given player in lobby lobbyID
func StartListener ¶
func StartListener()
Types ¶
type Event ¶
type Event struct { Name string SteamID string LobbyID uint LogsID int //logs.tf ID Players []TF2RconWrapper.Player Self bool // true if player has repped themselves }
Mirrored across github.com/TF2Stadium/Helen/event
type Server ¶
type Server struct { Map string // lobby map League string Type format.Format // 9v9 6v6 4v4... Whitelist string LobbyId uint StopVerifier chan struct{} Info gameserver.ServerRecord // contains filtered or unexported fields }
func (*Server) CVarChange ¶
func (*Server) GetPlayers ¶
func (s *Server) GetPlayers() ([]TF2RconWrapper.Player, error)
func (*Server) PlayerConnected ¶
func (s *Server) PlayerConnected(data TF2RconWrapper.PlayerData)
func (*Server) PlayerDisconnected ¶
func (s *Server) PlayerDisconnected(data TF2RconWrapper.PlayerData)
func (*Server) PlayerGlobalMessage ¶
func (s *Server) PlayerGlobalMessage(data TF2RconWrapper.PlayerData, text string)
func (*Server) RconCommand ¶
func (*Server) StartVerifier ¶
func (*Server) StopListening ¶
func (s *Server) StopListening()
func (*Server) TournamentStarted ¶
func (s *Server) TournamentStarted()
Click to show internal directories.
Click to hide internal directories.