bncComponentControl

package
v0.0.0-...-3d3f267 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2018 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Commands holds info for all of our valid commands.
	Commands = map[string]Command{
		"addnetwork": {
			Handler:     commandAddNetwork,
			Usage:       "addnetwork <name> <address> [[+]port] [password]",
			Description: "Add the given network, [+]port means use TLS and [password] is the connection password",
		},
		"adduser": {
			Handler:     commandAddUser,
			OperOnly:    true,
			Usage:       "adduser <username> <password>",
			Description: "Creates the given user with the given password",
		},
		"connect": {
			Handler:     commandConnectNetwork,
			Usage:       "connect [network]",
			Description: "Connect to this (or the given) network",
		},
		"disconnect": {
			Handler:     commandDisconnectNetwork,
			Usage:       "disconnect [network]",
			Description: "Disconnect from this (or the given) network",
		},
		"listnetworks": {
			Handler:     commandListNetworks,
			Usage:       "listnetworks",
			Description: "Lists all of your networks",
		},
	}
)

Functions

func Run

func Run(manager *ircbnc.Manager)

Types

type Command

type Command struct {
	Handler     func(*ircbnc.Listener, []string, ircmsg.IrcMessage)
	OperOnly    bool
	Usage       string
	Description string
}

Command holds the handlers and other info for a given command.

type Table

type Table struct {
	tablewriter.Table
	Out *bytes.Buffer
}

func NewTable

func NewTable() *Table

func (*Table) RenderToListener

func (table *Table) RenderToListener(listener *ircbnc.Listener, prefix string, command string)

func (*Table) RenderToString

func (table *Table) RenderToString() string

Jump to

Keyboard shortcuts

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