Versions in this module Expand all Collapse all v1 v1.1.2 Aug 6, 2026 Changes in this version type CModes + func NewCModesWithPrefixModes(channelModes, prefixModes, userPrefixes string) CModes type Config + DisableAutoMODEOnJoin bool + DisableAutoWHOOnJoin bool type Perms + Prefixes string v1.1.1 Aug 28, 2025 Changes in this version type Commands + func (cmd *Commands) SendRawNoSplit(raw string) error v1.1.0 Apr 30, 2025 Changes in this version + type EventError struct + Event *Event + func (e *EventError) Error() string + type InvalidConfigError struct + Conf Config + func (e InvalidConfigError) Error() string + type ParseEventError struct + Line string + func (e ParseEventError) Error() string + type STSUpgradeError struct + Err error + func (e STSUpgradeError) Error() string + type TimedOutError struct + Delay time.Duration + LastPing time.Time + LastPong time.Time + TimeSinceSuccess time.Duration + func (TimedOutError) Error() string v1.0.0 Apr 29, 2025 Changes in this version + const ADMIN + const ALL_EVENTS + const AUTHENTICATE + const AWAY + const AdminPrefix + const CAP + const CAP_ACCOUNT + const CAP_ACK + const CAP_AWAY + const CAP_CHGHOST + const CAP_CLEAR + const CAP_DEL + const CAP_END + const CAP_LIST + const CAP_LS + const CAP_NAK + const CAP_NEW + const CAP_REQ + const CAP_TAGMSG + const CLOSED + const CONNECT + const CONNECTED + const CTCP_ACTION + const CTCP_CLIENTINFO + const CTCP_ERRMSG + const CTCP_FINGER + const CTCP_PING + const CTCP_PONG + const CTCP_SOURCE + const CTCP_TIME + const CTCP_USERINFO + const CTCP_VERSION + const ChannelPrefix + const DIE + const DISCONNECTED + const DefaultPrefixes + const DistributedPrefix + const ERROR + const ERR_ALREADYREGISTRED + const ERR_BADCHANMASK + const ERR_BADCHANNELKEY + const ERR_BADMASK + const ERR_BANLISTFULL + const ERR_BANNEDFROMCHAN + const ERR_CANNOTSENDTOCHAN + const ERR_CANTKILLSERVER + const ERR_CHANNELISFULL + const ERR_CHANOPRIVSNEEDED + const ERR_ERRONEUSNICKNAME + const ERR_FILEERROR + const ERR_INPUTTOOLONG + const ERR_INVITEONLYCHAN + const ERR_KEYSET + const ERR_MONLISTFULL + const ERR_NEEDMOREPARAMS + const ERR_NICKCOLLISION + const ERR_NICKNAMEINUSE + const ERR_NOADMININFO + const ERR_NOCHANMODES + const ERR_NOLOGIN + const ERR_NOMOTD + const ERR_NONICKNAMEGIVEN + const ERR_NOOPERHOST + const ERR_NOORIGIN + const ERR_NOPERMFORHOST + const ERR_NOPRIVILEGES + const ERR_NORECIPIENT + const ERR_NOSERVICEHOST + const ERR_NOSUCHCHANNEL + const ERR_NOSUCHNICK + const ERR_NOSUCHSERVER + const ERR_NOSUCHSERVICE + const ERR_NOTEXTTOSEND + const ERR_NOTONCHANNEL + const ERR_NOTOPLEVEL + const ERR_NOTREGISTERED + const ERR_PASSWDMISMATCH + const ERR_RESTRICTED + const ERR_SASLABORTED + const ERR_SASLALREADY + const ERR_SASLFAIL + const ERR_SASLTOOLONG + const ERR_STARTTLS + const ERR_SUMMONDISABLED + const ERR_TOOMANYCHANNELS + const ERR_TOOMANYMATCHES + const ERR_TOOMANYTARGETS + const ERR_UMODEUNKNOWNFLAG + const ERR_UNAVAILRESOURCE + const ERR_UNIQOPPRIVSNEEDED + const ERR_UNKNOWNCOMMAND + const ERR_UNKNOWNMODE + const ERR_USERNOTINCHANNEL + const ERR_USERONCHANNEL + const ERR_USERSDISABLED + const ERR_USERSDONTMATCH + const ERR_WASNOSUCHNICK + const ERR_WILDTOPLEVEL + const ERR_YOUREBANNEDCREEP + const ERR_YOUWILLBEBANNED + const HalfOperatorPrefix + const INFO + const INITIALIZED + const INVITE + const ISON + const JOIN + const KICK + const KILL + const LINKS + const LIST + const LUSERS + const MODE + const MONITOR + const MOTD + const ModeAddPrefix + const ModeAdmin + const ModeDefaults + const ModeDelPrefix + const ModeHalfOperator + const ModeInviteOnly + const ModeKey + const ModeLimit + const ModeModerated + const ModeOperator + const ModeOwner + const ModePrivate + const ModeSecret + const ModeTopic + const ModeVoice + const NAMES + const NICK + const NJOIN + const NOTICE + const OPER + const OperatorPrefix + const OwnerPrefix + const PART + const PASS + const PING + const PONG + const PRIVMSG + const QUIT + const REHASH + const RESTART + const RPL_ADMINEMAIL + const RPL_ADMINLOC1 + const RPL_ADMINLOC2 + const RPL_ADMINME + const RPL_AWAY + const RPL_BANLIST + const RPL_BOUNCE + const RPL_CHANNELMODEIS + const RPL_CLOSEEND + const RPL_CLOSING + const RPL_CREATED + const RPL_CREATIONTIME + const RPL_ENDOFBANLIST + const RPL_ENDOFEXCEPTLIST + const RPL_ENDOFINFO + const RPL_ENDOFINVEXLIST + const RPL_ENDOFINVITELIST + const RPL_ENDOFLINKS + const RPL_ENDOFMONLIST + const RPL_ENDOFMOTD + const RPL_ENDOFNAMES + const RPL_ENDOFSERVICES + const RPL_ENDOFSTATS + const RPL_ENDOFUSERS + const RPL_ENDOFWHO + const RPL_ENDOFWHOIS + const RPL_ENDOFWHOWAS + const RPL_EXCEPTLIST + const RPL_GLOBALUSERS + const RPL_INFO + const RPL_INFOSTART + const RPL_INVEXLIST + const RPL_INVITELIST + const RPL_INVITING + const RPL_ISON + const RPL_ISUPPORT + const RPL_KILLDONE + const RPL_LINKS + const RPL_LIST + const RPL_LISTEND + const RPL_LISTSTART + const RPL_LOCALUSERS + const RPL_LOGGEDIN + const RPL_LOGGEDOUT + const RPL_LUSERCHANNELS + const RPL_LUSERCLIENT + const RPL_LUSERME + const RPL_LUSEROP + const RPL_LUSERUNKNOWN + const RPL_MONLIST + const RPL_MONOFFLINE + const RPL_MONONLINE + const RPL_MOTD + const RPL_MOTDSTART + const RPL_MYINFO + const RPL_MYPORTIS + const RPL_NAMREPLY + const RPL_NICKLOCKED + const RPL_NONE + const RPL_NOTOPIC + const RPL_NOUSERS + const RPL_NOWAWAY + const RPL_REHASHING + const RPL_SASLMECHS + const RPL_SASLSUCCESS + const RPL_SERVICE + const RPL_SERVICEINFO + const RPL_SERVLIST + const RPL_SERVLISTEND + const RPL_STARTTLS + const RPL_STATSBLINE + const RPL_STATSCLINE + const RPL_STATSCOMMANDS + const RPL_STATSDLINE + const RPL_STATSHLINE + const RPL_STATSILINE + const RPL_STATSKLINE + const RPL_STATSLINKINFO + const RPL_STATSLLINE + const RPL_STATSNLINE + const RPL_STATSOLINE + const RPL_STATSPING + const RPL_STATSQLINE + const RPL_STATSSLINE + const RPL_STATSUPTIME + const RPL_STATSVLINE + const RPL_STATSYLINE + const RPL_SUMMONING + const RPL_TIME + const RPL_TOPIC + const RPL_TOPICWHOTIME + const RPL_TRACECLASS + const RPL_TRACECONNECTING + const RPL_TRACEEND + const RPL_TRACEHANDSHAKE + const RPL_TRACELINK + const RPL_TRACELOG + const RPL_TRACENEWTYPE + const RPL_TRACEOPERATOR + const RPL_TRACERECONNECT + const RPL_TRACESERVER + const RPL_TRACESERVICE + const RPL_TRACEUNKNOWN + const RPL_TRACEUSER + const RPL_TRYAGAIN + const RPL_UMODEIS + const RPL_UNAWAY + const RPL_UNIQOPIS + const RPL_USERHOST + const RPL_USERS + const RPL_USERSSTART + const RPL_VERSION + const RPL_WELCOME + const RPL_WHOISACCOUNT + const RPL_WHOISACTUALLY + const RPL_WHOISCERTFP + const RPL_WHOISCHANNELS + const RPL_WHOISCHANOP + const RPL_WHOISHOST + const RPL_WHOISIDLE + const RPL_WHOISMODES + const RPL_WHOISOPERATOR + const RPL_WHOISREGNICK + const RPL_WHOISSERVER + const RPL_WHOISSPECIAL + const RPL_WHOISUSER + const RPL_WHOREPLY + const RPL_WHOSPCRPL + const RPL_WHOWASUSER + const RPL_YOUREOPER + const RPL_YOURESERVICE + const RPL_YOURHOST + const SERVER + const SERVICE + const SERVLIST + const SQUERY + const SQUIT + const STARTTLS + const STATS + const STS_ERR_FALLBACK + const STS_UPGRADE_INIT + const SUMMON + const TIME + const TOPIC + const TRACE + const UPDATE_GENERAL + const UPDATE_STATE + const USER + const USERHOST + const USERS + const UserModeInvisible + const UserModeOperator + const UserModeServerNotices + const UserModeWallops + const VERSION + const VoicePrefix + const WALLOPS + const WEBIRC + const WHO + const WHOIS + const WHOWAS + var DefaultMaxLineLength = 510 + var DefaultMaxPrefixLength = defaultPrefixPadding + defaultNickLength + defaultUserLength + defaultHostLength + var ErrConnNotTLS = errors.New("underlying connection is not tls") + var ErrInvalidSource = errors.New("event has nil or invalid source address") + var ErrNotConnected = errors.New("client is not connected to server") + func DefaultRecoverHandler(client *Client, err *HandlerError) + func EncodeCTCP(ctcp *CTCPEvent) (out string) + func EncodeCTCPRaw(cmd, text string) (out string) + func Fmt(text string) string + func Glob(input, match string) bool + func IsValidChannel(channel string) bool + func IsValidChannelMode(raw string) bool + func IsValidNick(nick string) bool + func IsValidUser(name string) bool + func StripRaw(text string) string + func ToRFC1459(input string) string + func TrimFmt(text string) string + type CMode struct + func (c *CMode) Short() string + func (c *CMode) String() string + type CModes struct + func NewCModes(channelModes, userPrefixes string) CModes + func (c *CModes) Apply(modes []CMode) + func (c *CModes) Copy() (nc CModes) + func (c *CModes) Get(mode string) (args string, ok bool) + func (c *CModes) HasMode(mode string) bool + func (c *CModes) Parse(flags string, args []string) (out []CMode) + func (c *CModes) String() string + type CTCP struct + func (c *CTCP) Clear(cmd string) + func (c *CTCP) ClearAll() + func (c *CTCP) Set(cmd string, handler func(client *Client, ctcp CTCPEvent)) + func (c *CTCP) SetBg(cmd string, handler func(client *Client, ctcp CTCPEvent)) + type CTCPEvent struct + Command string + Origin *Event + Reply bool + Source *Source + Text string + func DecodeCTCP(e *Event) *CTCPEvent + type CTCPHandler func(client *Client, ctcp CTCPEvent) + type Caller struct + func (c *Caller) Add(cmd string, handler func(client *Client, event Event)) (cuid string) + func (c *Caller) AddBg(cmd string, handler func(client *Client, event Event)) (cuid string) + func (c *Caller) AddHandler(cmd string, handler Handler) (cuid string) + func (c *Caller) AddTmp(cmd string, deadline time.Duration, ...) (cuid string, done chan struct{}) + func (c *Caller) Clear(cmd string) + func (c *Caller) ClearAll() + func (c *Caller) Count(cmd string) int + func (c *Caller) Len() int + func (c *Caller) Remove(cuid string) (success bool) + func (c *Caller) String() string + type Channel struct + Joined time.Time + Modes CModes + Name string + Topic string + UserList []string + func (ch *Channel) Copy() *Channel + func (ch *Channel) Len() int + func (ch *Channel) Lifetime() time.Duration + func (ch *Channel) UserIn(name string) bool + func (ch Channel) Admins(c *Client) []*User + func (ch Channel) Trusted(c *Client) []*User + func (ch Channel) Users(c *Client) []*User + type Client struct + CTCP *CTCP + Cmd *Commands + Config Config + Handlers *Caller + func New(config Config) *Client + func (c *Client) ChannelList() []string + func (c *Client) Channels() []*Channel + func (c *Client) Close() + func (c *Client) ConnSince() (since *time.Duration, err error) + func (c *Client) Connect() error + func (c *Client) DialerConnect(dialer Dialer) error + func (c *Client) DisableTracking() + func (c *Client) GetHost() (host string) + func (c *Client) GetID() string + func (c *Client) GetIdent() string + func (c *Client) GetNick() string + func (c *Client) GetServerOption(key string) (result string, ok bool) + func (c *Client) GetServerOptionInt(key string) (result int, ok bool) + func (c *Client) HasCapability(name string) (has bool) + func (c *Client) IsConnected() bool + func (c *Client) IsInChannel(channel string) (in bool) + func (c *Client) Latency() (delta time.Duration) + func (c *Client) Lifetime() time.Duration + func (c *Client) LookupChannel(name string) (channel *Channel) + func (c *Client) LookupUser(nick string) (user *User) + func (c *Client) MaxEventLength() (max int) + func (c *Client) MockConnect(conn net.Conn) error + func (c *Client) NetworkName() (name string) + func (c *Client) Quit(reason string) + func (c *Client) RunHandlers(event *Event) + func (c *Client) Send(event *Event) + func (c *Client) Server() string + func (c *Client) ServerMOTD() (motd string) + func (c *Client) ServerVersion() (version string) + func (c *Client) String() string + func (c *Client) TLSConnectionState() (*tls.ConnectionState, error) + func (c *Client) Uptime() (up *time.Time, err error) + func (c *Client) UserList() []string + func (c *Client) Users() []*User + type Commands struct + func (cmd *Commands) Action(target, message string) + func (cmd *Commands) Actionf(target, format string, a ...interface{}) + func (cmd *Commands) Away(reason string) + func (cmd *Commands) Back() + func (cmd *Commands) Ban(channel, mask string) + func (cmd *Commands) Invite(channel string, users ...string) + func (cmd *Commands) Join(channels ...string) + func (cmd *Commands) JoinKey(channel, password string) + func (cmd *Commands) Kick(channel, user, reason string) + func (cmd *Commands) List(channels ...string) + func (cmd *Commands) Message(target, message string) + func (cmd *Commands) Messagef(target, format string, a ...interface{}) + func (cmd *Commands) Mode(target, modes string, params ...string) + func (cmd *Commands) Monitor(modifier rune, args ...string) + func (cmd *Commands) Nick(name string) + func (cmd *Commands) Notice(target, message string) + func (cmd *Commands) Noticef(target, format string, a ...interface{}) + func (cmd *Commands) Oper(user, pass string) + func (cmd *Commands) Part(channels ...string) + func (cmd *Commands) PartMessage(channel, message string) + func (cmd *Commands) Ping(id string) + func (cmd *Commands) Pong(id string) + func (cmd *Commands) Reply(event Event, message string) + func (cmd *Commands) ReplyTo(event Event, message string) + func (cmd *Commands) ReplyTof(event Event, format string, a ...interface{}) + func (cmd *Commands) Replyf(event Event, format string, a ...interface{}) + func (cmd *Commands) SendCTCP(target, ctcpType, message string) + func (cmd *Commands) SendCTCPReply(target, ctcpType, message string) + func (cmd *Commands) SendCTCPReplyf(target, ctcpType, format string, a ...interface{}) + func (cmd *Commands) SendCTCPf(target, ctcpType, format string, a ...interface{}) + func (cmd *Commands) SendRaw(raw ...string) error + func (cmd *Commands) SendRawf(format string, a ...interface{}) error + func (cmd *Commands) Topic(channel, message string) + func (cmd *Commands) Unban(channel, mask string) + func (cmd *Commands) Who(users ...string) + func (cmd *Commands) Whois(users ...string) + func (cmd *Commands) Whowas(user string, amount int) + type Config struct + AllowFlood bool + Bind string + Debug io.Writer + DisableSTS bool + DisableSTSFallback bool + GlobalFormat bool + HandleNickCollide func(oldNick string) (newNick string) + Name string + Nick string + Out io.Writer + PingDelay time.Duration + PingTimeout time.Duration + Port int + RecoverFunc func(c *Client, e *HandlerError) + SASL SASLMech + SSL bool + Server string + ServerPass string + SupportedCaps map[string][]string + TLSConfig *tls.Config + User string + Version string + WebIRC WebIRC + type Dialer interface + Dial func(network, address string) (net.Conn, error) + type ErrEvent struct + Event *Event + func (e *ErrEvent) Error() string + type ErrInvalidConfig struct + Conf Config + func (e ErrInvalidConfig) Error() string + type ErrParseEvent struct + Line string + func (e ErrParseEvent) Error() string + type ErrSTSUpgradeFailed struct + Err error + func (e ErrSTSUpgradeFailed) Error() string + type ErrTimedOut struct + Delay time.Duration + LastPing time.Time + LastPong time.Time + TimeSinceSuccess time.Duration + func (ErrTimedOut) Error() string + type Event struct + Command string + Echo bool + Params []string + Sensitive bool + Source *Source + Tags Tags + Timestamp time.Time + func ParseEvent(raw string) (e *Event) + func (e *Event) Bytes() []byte + func (e *Event) Copy() *Event + func (e *Event) Equals(ev *Event) bool + func (e *Event) IsAction() bool + func (e *Event) IsCTCP() (ok bool, ctcp *CTCPEvent) + func (e *Event) IsFromChannel() bool + func (e *Event) IsFromUser() bool + func (e *Event) Last() string + func (e *Event) Len() (length int) + func (e *Event) LenOpts(includeTags bool) (length int) + func (e *Event) Pretty() (out string, ok bool) + func (e *Event) String() string + func (e *Event) StripAction() string + type Handler interface + Execute func(*Client, Event) + type HandlerError struct + Event Event + File string + Func string + ID string + Line int + Panic interface{} + Stack []byte + func (e *HandlerError) Error() string + func (e *HandlerError) String() string + type HandlerFunc func(client *Client, event Event) + func (f HandlerFunc) Execute(client *Client, event Event) + type Perms struct + Admin bool + HalfOp bool + Op bool + Owner bool + Voice bool + func (m Perms) IsAdmin() bool + func (m Perms) IsTrusted() bool + type SASLExternal struct + Identity string + func (sasl *SASLExternal) Encode(params []string) string + func (sasl *SASLExternal) Method() string + type SASLMech interface + Encode func(params []string) (output string) + Method func() string + type SASLPlain struct + Pass string + User string + func (sasl *SASLPlain) Encode(params []string) string + func (sasl *SASLPlain) Method() string + type Source struct + Host string + Ident string + Name string + func ParseSource(raw string) (src *Source) + func (s *Source) Bytes() []byte + func (s *Source) Copy() *Source + func (s *Source) Equals(ss *Source) bool + func (s *Source) ID() string + func (s *Source) IsHostmask() bool + func (s *Source) IsServer() bool + func (s *Source) Len() (length int) + func (s *Source) String() (out string) + type Tags map[string]string + func ParseTags(raw string) (t Tags) + func (t Tags) Bytes() []byte + func (t Tags) Count() int + func (t Tags) Equals(tt Tags) bool + func (t Tags) Get(key string) (tag string, success bool) + func (t Tags) Keys() (keys []string) + func (t Tags) Len() (length int) + func (t Tags) Remove(key string) (success bool) + func (t Tags) Set(key, value string) error + func (t Tags) String() string + type User struct + ChannelList []string + Extras struct{ ... } + FirstSeen time.Time + Host string + Ident string + LastActive time.Time + Nick string + Perms *UserPerms + func (u *User) Active() time.Duration + func (u *User) Copy() *User + func (u *User) InChannel(name string) bool + func (u *User) IsActive() bool + func (u *User) Lifetime() time.Duration + func (u User) Channels(c *Client) []*Channel + type UserPerms struct + func (p *UserPerms) Copy() (perms *UserPerms) + func (p *UserPerms) Lookup(channel string) (perms Perms, ok bool) + func (p *UserPerms) MarshalJSON() ([]byte, error) + type WebIRC struct + Address string + Gateway string + Hostname string + Password string + func (w WebIRC) Params() []string