server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package server 战地1服务器操作

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Maps

type Maps []m

Maps 地图切片

type Server

type Server struct {
	SID  string
	GID  string
	PGID string
}

Server 服务器结构体

func NewServer

func NewServer(sid, gid, pgid string) *Server

NewServer 服务器

func (*Server) Ban

func (s *Server) Ban(pid string) error

Ban player, check returned id

func (*Server) ChangeMap

func (s *Server) ChangeMap(index int) error

ChangeMap will change the map for players

func (*Server) GetAdminspid

func (s *Server) GetAdminspid() ([]string, error)

GetAdminspid returns pids of admins

func (*Server) GetMaps

func (s *Server) GetMaps() (*Maps, error)

GetMaps returns maps

func (*Server) Kick

func (s *Server) Kick(pid, reason string) (string, error)

Kick player, reason needs BIG5, return reason and err

func (*Server) Unban

func (s *Server) Unban(pid string) error

Unban player

Jump to

Keyboard shortcuts

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