Documentation
¶
Index ¶
- type Bot
- func (b *Bot) AddStage(s Stage)
- func (b *Bot) Close()
- func (b *Bot) Ctx() context.Context
- func (b *Bot) RLock()
- func (b *Bot) RUnlock()
- func (b *Bot) RxMsgs() uint64
- func (b *Bot) TeeMsg() *TeeMsgConn
- func (b *Bot) TxMsgs() uint64
- func (b *Bot) Update(p Profile) error
- func (b *Bot) Write(tid TaskId, msg irc.Message) error
- type Cmd
- type Dispatcher
- type Gang
- type Log
- type Login
- type MsgConn
- type MsgConnStats
- type Pattern
- type PatternMatcher
- type Profile
- type ProfileLogin
- type Stage
- type State
- type Task
- type TaskFunc
- type TaskId
- type Tasks
- type TeeMsgConn
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { Profile Start Time State *State Login *Login Tasks *Tasks // contains filtered or unexported fields }
func (*Bot) TeeMsg ¶
func (b *Bot) TeeMsg() *TeeMsgConn
type Dispatcher ¶
func NewDispatcher ¶
func NewDispatcher(p *Profile, t *Tasks) *Dispatcher
func (*Dispatcher) Env ¶
func (d *Dispatcher) Env() []string
func (*Dispatcher) Process ¶
func (d *Dispatcher) Process(msg irc.Message) error
func (*Dispatcher) Update ¶
func (d *Dispatcher) Update(pats, rawpats []Pattern) error
type Gang ¶
func (*Gang) UnlockBots ¶
func (g *Gang) UnlockBots()
type Login ¶
type Login struct { *ProfileLogin Netpfx *irc.Prefix // contains filtered or unexported fields }
func NewLogin ¶
func NewLogin(p *ProfileLogin, t *Tasks) *Login
type MsgConn ¶
type MsgConn struct { *irc.Conn MsgConnStats // contains filtered or unexported fields }
func NewMsgConn ¶
type MsgConnStats ¶
type MsgConnStats struct {
// contains filtered or unexported fields
}
func (*MsgConnStats) RxMsgs ¶
func (m *MsgConnStats) RxMsgs() uint64
func (*MsgConnStats) TxMsgs ¶
func (m *MsgConnStats) TxMsgs() uint64
type PatternMatcher ¶
type PatternMatcher struct {
// contains filtered or unexported fields
}
func NewPatternMatcher ¶
func NewPatternMatcher(pats []Pattern) (*PatternMatcher, error)
func (*PatternMatcher) Apply ¶
func (pm *PatternMatcher) Apply(txt string) string
type Profile ¶
type Profile struct { ProfileLogin Chans []string RateMs int Verbosity int // Id is the way to reference this bot. Id string Patterns []Pattern PatternsRaw []Pattern }
func UnmarshalProfile ¶
type ProfileLogin ¶
type Task ¶
type TeeMsgConn ¶
type TeeMsgConn struct { *MsgConn // contains filtered or unexported fields }
func NewTeeMsgConn ¶
func (*TeeMsgConn) DropReadChan ¶
func (mc *TeeMsgConn) DropReadChan(rc <-chan irc.Message)
func (*TeeMsgConn) NewReadChan ¶
func (tmc *TeeMsgConn) NewReadChan() (<-chan irc.Message, chan<- struct{})
Source Files
¶
Click to show internal directories.
Click to hide internal directories.