commands

package
v0.0.0-...-2102788 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands map[string]Command = map[string]Command{

	"play":       {commandslist.Play, 0, ""},
	"spec":       {commandslist.Spec, 0, ""},
	"currentmap": {commandslist.CurrentMap, 0, ""},
	"nextmap":    {commandslist.NextMap, 0, ""},
	"stamina":    {commandslist.Stamina, 0, ""},
	"ready":      {commandslist.Ready, 0, "!ready"},
	"goto":       {commandslist.Goto, 0, "!goto"},
	"invisible":  {commandslist.Invisible, 0, "!invisible"},
	"loadonce":   {commandslist.Loadonce, 0, "!loadonce"},
	"map":        {commandslist.MapFn, 0, "!map [search]"},
	"maps":       {commandslist.MapList, 0, "!maps"},
	"callvote":   {commandslist.Callvote, 0, "!callvote tocomplete"},
	"+":          {commandslist.VoteYes, 0, ""},
	"-":          {commandslist.VoteNo, 0, ""},

	"setgoto":    {commandslist.SetGoto, 80, ""},
	"removegoto": {commandslist.RemoveGoto, 80, ""},
	"download":   {commandslist.Download, 80, ""},
	"timelimit":  {commandslist.Timelimit, 80, "!timelimit [1-999]"},
	"extend":     {commandslist.Extend, 80, "!extend or !extend [1-999]"},

	"players": {commandslist.PlayersList, 0, "!players"},
	"player":  {commandslist.PlayersGet, 0, "!player"},
}
View Source
var CommandsShortcut map[string]string = map[string]string{
	"pl":     "play",
	"sp":     "spec",
	"rmgoto": "removegoto",
	"invi":   "invisible",
	"l1":     "loadonce",
	"lo":     "loadonce",
	"mapget": "download",
	"mg":     "download",
	"dl":     "download",
	"cv":     "callvote",
}

Functions

func HandleCommand

func HandleCommand(action_params []string, server *models.Server)

Types

type Command

type Command struct {
	Function interface{}
	Level    int
	Usage    string
}

Directories

Path Synopsis
shared

Jump to

Keyboard shortcuts

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