command

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: BSD-3-Clause Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Commands list
	Commands []Command
	// Server global
	Server *client.Server
	// CurrentChannel name
	CurrentChannel = client.StatusChannel
)

Functions

func Register

func Register(server *client.Server)

Register client commands

func Run

func Run(command string, args []string) error

Run command by name and arguments

Types

type AwayCmd added in v0.9.2

type AwayCmd struct {
	*MetadataTmpl
}

AwayCmd struct

func (*AwayCmd) Exec added in v0.9.2

func (e *AwayCmd) Exec(args []string) error

Exec for AwayCmd command

func (*AwayCmd) Metadata added in v0.9.2

func (e *AwayCmd) Metadata() CommandMetadata

Metadata for AwayCmd command

type Command

type Command interface {
	Metadata() CommandMetadata
	Exec(args []string) error
}

Command functions that a command must offer

func Get

func Get(cmd string) Command

Get command by name parsed from client input

type CommandMetadata

type CommandMetadata interface {
	Name() string
	Args() string
	Description() string
	Aliases() []string
}

CommandMetadata functions that a command must offer

type ConnectCmd

type ConnectCmd struct {
	*MetadataTmpl
}

ConnectCmd struct

func (*ConnectCmd) Exec

func (e *ConnectCmd) Exec(args []string) error

Exec connect command

func (*ConnectCmd) Metadata

func (e *ConnectCmd) Metadata() CommandMetadata

Metadata for conenct command

type EmptyCmd

type EmptyCmd struct {
	*MetadataTmpl
}

EmptyCmd struct

func (*EmptyCmd) Exec

func (e *EmptyCmd) Exec(args []string) error

Exec empty command

func (*EmptyCmd) Metadata

func (e *EmptyCmd) Metadata() CommandMetadata

Metadata for empty command

type ExitCmd

type ExitCmd struct {
	*MetadataTmpl
}

ExitCmd struct

func (*ExitCmd) Exec

func (e *ExitCmd) Exec(args []string) error

Exec exit command

func (*ExitCmd) Metadata

func (e *ExitCmd) Metadata() CommandMetadata

Metadata for ext command

type HelpCmd

type HelpCmd struct {
	*MetadataTmpl
}

HelpCmd struct

func (*HelpCmd) Exec

func (e *HelpCmd) Exec(args []string) error

Exec help command

func (*HelpCmd) Metadata

func (e *HelpCmd) Metadata() CommandMetadata

Metadata for help command

type JoinCmd

type JoinCmd struct {
	*MetadataTmpl
}

JoinCmd strcut

func (*JoinCmd) Exec

func (e *JoinCmd) Exec(args []string) error

Exec join command

func (*JoinCmd) Metadata

func (e *JoinCmd) Metadata() CommandMetadata

Metadata for join command

type KickCmd added in v0.9.2

type KickCmd struct {
	*MetadataTmpl
}

KickCmd struct

func (*KickCmd) Exec added in v0.9.2

func (e *KickCmd) Exec(args []string) error

Exec for KickCmd command

func (*KickCmd) Metadata added in v0.9.2

func (e *KickCmd) Metadata() CommandMetadata

Metadata for KickCmd command

type LogoCmd

type LogoCmd struct {
	*MetadataTmpl
}

LogoCmd struct

func (*LogoCmd) Exec

func (e *LogoCmd) Exec(args []string) error

Exec logo command

func (*LogoCmd) Metadata

func (e *LogoCmd) Metadata() CommandMetadata

Metadata for logo command

type MeCmd

type MeCmd struct {
	*MetadataTmpl
}

MeCmd struct

func (*MeCmd) Exec

func (e *MeCmd) Exec(args []string) error

Exec me command

func (*MeCmd) Metadata

func (e *MeCmd) Metadata() CommandMetadata

Metadata for me command

type MetadataTmpl

type MetadataTmpl struct {
	// contains filtered or unexported fields
}

MetadataTmpl for commands

func (*MetadataTmpl) Aliases

func (c *MetadataTmpl) Aliases() []string

Aliases for command

func (*MetadataTmpl) Args

func (c *MetadataTmpl) Args() string

Args for command

func (*MetadataTmpl) Description

func (c *MetadataTmpl) Description() string

Description of command

func (*MetadataTmpl) Name

func (c *MetadataTmpl) Name() string

Name of command

type NamesCmd

type NamesCmd struct {
	*MetadataTmpl
}

NamesCmd struct

func (*NamesCmd) Exec

func (e *NamesCmd) Exec(args []string) error

Exec for names command

func (*NamesCmd) Metadata

func (e *NamesCmd) Metadata() CommandMetadata

Metadata for names command

type NickCmd

type NickCmd struct {
	*MetadataTmpl
}

NickCmd struct

func (*NickCmd) Exec

func (e *NickCmd) Exec(args []string) error

Exec for nick command

func (*NickCmd) Metadata

func (e *NickCmd) Metadata() CommandMetadata

Metadata for nick command

type NoticeCmd

type NoticeCmd struct {
	*MetadataTmpl
}

NoticeCmd struct

func (*NoticeCmd) Exec

func (e *NoticeCmd) Exec(args []string) error

Exec notice command

func (*NoticeCmd) Metadata

func (e *NoticeCmd) Metadata() CommandMetadata

Metadata for notice command

type PartCmd

type PartCmd struct {
	*MetadataTmpl
}

PartCmd struct

func (*PartCmd) Exec

func (e *PartCmd) Exec(args []string) error

Exec for part command

func (*PartCmd) Metadata

func (e *PartCmd) Metadata() CommandMetadata

Metadata for part command

type PassCmd

type PassCmd struct {
	*MetadataTmpl
}

PassCmd struct

func (*PassCmd) Exec

func (e *PassCmd) Exec(args []string) error

Exec pass command

func (*PassCmd) Metadata

func (e *PassCmd) Metadata() CommandMetadata

Metadata for pass command

type QueryCmd

type QueryCmd struct {
	*MetadataTmpl
}

QueryCmd struct

func (*QueryCmd) Exec

func (e *QueryCmd) Exec(args []string) error

Exec for query command

func (*QueryCmd) Metadata

func (e *QueryCmd) Metadata() CommandMetadata

Metadata for query command

type RawCmd

type RawCmd struct {
	*MetadataTmpl
}

RawCmd struct

func (*RawCmd) Exec

func (e *RawCmd) Exec(args []string) error

Exec for raw command

func (*RawCmd) Metadata

func (e *RawCmd) Metadata() CommandMetadata

Metadata for raw command

type ShrugCmd

type ShrugCmd struct {
	*MetadataTmpl
}

ShrugCmd struct

func (*ShrugCmd) Exec

func (e *ShrugCmd) Exec(args []string) error

Exec for shrug command

func (*ShrugCmd) Metadata

func (e *ShrugCmd) Metadata() CommandMetadata

Metadata for shrug command

type StatusCmd

type StatusCmd struct {
	*MetadataTmpl
}

StatusCmd struct

func (*StatusCmd) Exec

func (e *StatusCmd) Exec(args []string) error

Exec status command

func (*StatusCmd) Metadata

func (e *StatusCmd) Metadata() CommandMetadata

Metadata for status command

type TableFlipCmd

type TableFlipCmd struct {
	*MetadataTmpl
}

TableFlipCmd struct

func (*TableFlipCmd) Exec

func (e *TableFlipCmd) Exec(args []string) error

Exec for TableFlipCmd command

func (*TableFlipCmd) Metadata

func (e *TableFlipCmd) Metadata() CommandMetadata

Metadata for TableFlipCmd command

type TopicCmd

type TopicCmd struct {
	*MetadataTmpl
}

TopicCmd struct

func (*TopicCmd) Exec

func (e *TopicCmd) Exec(args []string) error

Exec for TopicCmd command

func (*TopicCmd) Metadata

func (e *TopicCmd) Metadata() CommandMetadata

Metadata for TopicCmd command

type VersionCmd

type VersionCmd struct {
	*MetadataTmpl
}

VersionCmd struct

func (*VersionCmd) Exec

func (e *VersionCmd) Exec(args []string) error

Exec version command

func (*VersionCmd) Metadata

func (e *VersionCmd) Metadata() CommandMetadata

Metadata for version command

type WhoCmd

type WhoCmd struct {
	*MetadataTmpl
}

WhoCmd struct

func (*WhoCmd) Exec

func (e *WhoCmd) Exec(args []string) error

Exec WhoCmd

func (*WhoCmd) Metadata

func (e *WhoCmd) Metadata() CommandMetadata

Metadata for WhoCmd

type WhoIsCmd

type WhoIsCmd struct {
	*MetadataTmpl
}

WhoIsCmd struct

func (*WhoIsCmd) Exec

func (e *WhoIsCmd) Exec(args []string) error

Exec WhoIsCmd

func (*WhoIsCmd) Metadata

func (e *WhoIsCmd) Metadata() CommandMetadata

Metadata for WhoIsCmd

type WindowCmd

type WindowCmd struct {
	*MetadataTmpl
}

WindowCmd struct

func (*WindowCmd) Exec

func (e *WindowCmd) Exec(args []string) error

Exec WindowCmd

func (*WindowCmd) Metadata

func (e *WindowCmd) Metadata() CommandMetadata

Metadata for WindowCmd

Jump to

Keyboard shortcuts

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