Documentation
¶
Index ¶
- Variables
- func LogErr()
- func LogInit(traceHandle io.Writer, warningHandle io.Writer, errorHandle io.Writer)
- func LogVerbose()
- func LogWarn()
- type Bot
- func (bot *Bot) AddModule(mod Module)
- func (bot *Bot) Auth(pass string)
- func (bot *Bot) Broadcast(message string)
- func (bot *Bot) JoinChan(chanName string) *Channel
- func (bot *Bot) NewChannel(channel string) *Channel
- func (bot *Bot) Notice(who, text string)
- func (bot *Bot) PM(who, text string)
- func (bot *Bot) Part(channel string)
- func (bot *Bot) Quit()
- func (bot *Bot) Register(pass string, email string)
- type Channel
- func (c *Channel) AddModule(mod Module)
- func (c *Channel) DumpLogs()
- func (c *Channel) HandleLogs()
- func (c *Channel) HandleMessage(msg *Message)
- func (c *Channel) IgnoreNick(nick string)
- func (c *Channel) Part()
- func (c *Channel) Say(message string)
- func (c *Channel) UnignoreNick(nick string)
- func (c *Channel) UpdateUsers()
- type Message
- type Mode
- type Module
- type NullWriter
- type PingResp
- type User
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func LogVerbose ¶
func LogVerbose()
Types ¶
type Bot ¶
type Bot struct {
Server string
Nick string
Channels map[string]*Channel
Modules []Module
Conn *connection
}
func (*Bot) NewChannel ¶
Creates and joins a new channel
type Channel ¶
type Channel struct {
Name string
Buffer []*Message
Bot *Bot
Ignored map[string]bool
Ready bool
Users map[string]*User
Me *User
Modules []Module
}
Representation of a channel or a user query
func (*Channel) DumpLogs ¶
func (c *Channel) DumpLogs()
Dumps current logs into a file and wipes the Buffer
func (*Channel) HandleLogs ¶
func (c *Channel) HandleLogs()
Dumps logs every 24 hours to ensure that the buffer doesn't get too big
func (*Channel) HandleMessage ¶
Handles a message in a channel.
func (*Channel) IgnoreNick ¶
Ignores a nick, preferrably for a bot, but also potentially for spammers
func (*Channel) UnignoreNick ¶
Unignores a nick in the channel
func (*Channel) UpdateUsers ¶
func (c *Channel) UpdateUsers()
type Message ¶
type Message struct {
Nick string
User string
Host string
Time time.Time
Cmd string
Text string
Arguments []string
}
func ParseMessage ¶
Code shamelessly grabbed from go-ircevent
type NullWriter ¶
type NullWriter int
Click to show internal directories.
Click to hide internal directories.
