Versions in this module Expand all Collapse all v0 v0.5.7 Jun 14, 2021 Changes in this version + var ErrNotConnected = errors.New("cannot send a message when not connected") + var ErrorIRCAlreadyConnected = errors.New("IRC is already connected") + type Admin struct + Level int + Mask string + type Conf struct + AdminChannels []string + Admins []Admin + AuthPasswd string + AuthUser string + Authenticate bool + CmdPfx string + Gecos string + Host string + HostPasswd string + Ident string + Nick string + Port string + SASL bool + SSL bool + SuppressMOTD bool + SuppressPing bool + VerifyCerts bool + type IRC struct + Connected mutexTypes.Bool + ParsedEvents *event.Manager + RawEvents *event.Manager + StopRequested mutexTypes.Bool + func New(conf tomlconf.ConfigHolder, logger *log.Logger) (*IRC, error) + func (i *IRC) AdminLevel(source string) int + func (i *IRC) Connect() error + func (i *IRC) Disconnect(msg string) + func (i *IRC) HookJoin(f func(source, channel string)) + func (i *IRC) HookKick(f func(source, channel, target, message string)) + func (i *IRC) HookMessage(f func(source, channel, message string, isAction bool)) + func (i *IRC) HookNick(f func(source, newNick string)) + func (i *IRC) HookPart(f func(source, channel, message string)) + func (i *IRC) HookPrivateMessage(f func(source, channel, message string)) + func (i *IRC) HookQuit(f func(source, message string)) + func (i *IRC) HumanReadableSource(source string) string + func (i *IRC) IsCommandPrefix(line string) (string, bool) + func (i *IRC) JoinChannel(name string) + func (i *IRC) Reload(tree interfaces.Unmarshaler) error + func (i *IRC) Run() error + func (i *IRC) SendAdminMessage(msg string) + func (i *IRC) SendMessage(target, message string) + func (i *IRC) SendNotice(target, message string) + func (i *IRC) SendRaw(raw string) + func (i *IRC) StaticCommandPrefixes() []string + func (i *IRC) Status() string + func (i *IRC) String() string + type JoinEvent struct + Channel string + Source ircutils.UserHost + func NewJoinEvent(name string, line ircmsg.IrcMessage, tme time.Time) *JoinEvent + type KickEvent struct + Channel string + KickedNick string + Message string + Source ircutils.UserHost + func NewKickEvent(name string, line ircmsg.IrcMessage, tme time.Time) *KickEvent + type LineHandler func(message *ircmsg.IrcMessage, irc *IRC) + type MessageEvent struct + Channel string + IsNotice bool + Message string + Source ircutils.UserHost + func NewMessageEvent(name string, line ircmsg.IrcMessage, tme time.Time) *MessageEvent + type NickEvent struct + NewNick string + Source ircutils.UserHost + func NewNickEvent(name string, line ircmsg.IrcMessage, tme time.Time) *NickEvent + type PartEvent struct + Message string + func NewPartEvent(name string, line ircmsg.IrcMessage, tme time.Time) *PartEvent + type QuitEvent struct + Message string + Source ircutils.UserHost + func NewQuitEvent(name string, line ircmsg.IrcMessage, tme time.Time) *QuitEvent + type RawEvent struct + Line ircmsg.IrcMessage + Time time.Time + func NewRawEvent(name string, line ircmsg.IrcMessage, tme time.Time) *RawEvent + func (r *RawEvent) CommandIs(names ...string) bool + type Transformer struct + func (Transformer) MakeIntermediate(in string) string + func (Transformer) Transform(in string) string v0.5.6 Sep 25, 2020