commander

package
v0.0.0-...-e2e6f4c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandContext

type CommandContext = *cmdtable.CommandContext[ExecCommand]

func Local

type Commander

type Commander struct {
	Admins       map[string]bool
	GlobalPrefix string
	Prefixes     []string

	CommandHook    func(login string, msg *ircon.Message)
	CommandPreHook func(string, string) string
	MutateConfHook func(string, map[string]string) map[string]string

	OutputFunc func(msg output.Message, ival int, banphrase string)
	// contains filtered or unexported fields
}

func New

func New(login string) *Commander

func (*Commander) Configure

func (c *Commander) Configure(login string, conf map[string]string)

func (*Commander) Disabled

func (c *Commander) Disabled(login string) (disabled, ok bool)

func (*Commander) Exec

func (c *Commander) Exec(ctx context.Context)

func (*Commander) Message

func (c *Commander) Message(msg *ircon.Message)

cmd handles a single message/command.

func (*Commander) Remove

func (c *Commander) Remove(login string)

func (*Commander) SetLive

func (c *Commander) SetLive(id, login string, live bool)

func (*Commander) SyncHighRL

func (c *Commander) SyncHighRL(login, badge string)

func (*Commander) SyncSlowMode

func (c *Commander) SyncSlowMode(login string, slow int)

func (*Commander) Table

func (c *Commander) Table() *cmdtable.Table[ExecCommand]

Table returns a command table that can modified during the configuration state to provide static commands.

func (*Commander) WithBancheck

func (c *Commander) WithBancheck(msg output.Message) output.Message

type ExecCommand

type ExecCommand interface {
	Exec(ctx context.Context, cmd ipc.MessageContext) (resp ipc.Response, err error)
}

Source Files

  • commander.go
  • metrics.go

Jump to

Keyboard shortcuts

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