Documentation ¶
Index ¶
- Constants
- func GetNick(name string) string
- type Connection
- func (c *Connection) DelayedSend(sock net.Conn, dur time.Duration, channel, msg string)
- func (c *Connection) GetNicks(channel string) []string
- func (c *Connection) Kill()
- func (c *Connection) Run()
- func (c *Connection) SendJoin(channel string)
- func (c *Connection) SendNames(channel string)
- func (c *Connection) SendNick(nick string)
- func (c *Connection) SendNotice(channel, msg string)
- func (c *Connection) SendPart(channel, msg string)
- func (c *Connection) SendPass(pass string)
- func (c *Connection) SendPong(ping string)
- func (c *Connection) SendPrivmsg(channel, msg string)
- func (c *Connection) SendQuit(msg string)
- func (c *Connection) SendRaw(msg string) error
- func (c *Connection) SendUser(user, realname string)
Constants ¶
View Source
const (
//IrcVersion exports the current version of the irc lib
IrcVersion = "0.1.1776"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct { Sock net.Conn DirectCallback func(string, string) PrivmsgCallback func(string, string, string) JoinCallback func(string, string) QuitCallback func(string, string) PartCallback func(string, string, string) NickCallback func(string, string) NumericCallback func(string, int, string) // contains filtered or unexported fields }
Connection holds the callbacks for the client
func NewConnection ¶
func NewConnection(server, nick, user string, pass *string, chans []string) *Connection
NewConnection creates and connects an Connection
func (*Connection) DelayedSend ¶
DelayedSend sends a privmsg AFTER the specified delay
func (*Connection) GetNicks ¶
func (c *Connection) GetNicks(channel string) []string
GetNicks returns a array of all nicks in a channel
func (*Connection) SendNames ¶
func (c *Connection) SendNames(channel string)
SendNames sends a NAMES request for the channel
func (*Connection) SendNick ¶
func (c *Connection) SendNick(nick string)
SendNick changes the clients nick
func (*Connection) SendNotice ¶
func (c *Connection) SendNotice(channel, msg string)
SendNotice sends a notice to channel/target
func (*Connection) SendPart ¶
func (c *Connection) SendPart(channel, msg string)
SendPart sends a PART
func (*Connection) SendPass ¶
func (c *Connection) SendPass(pass string)
SendPass sends a PASS for network
func (*Connection) SendPong ¶
func (c *Connection) SendPong(ping string)
SendPong replies to the received PING
func (*Connection) SendPrivmsg ¶
func (c *Connection) SendPrivmsg(channel, msg string)
SendPrivmsg sends a privmsg to channel/target
func (*Connection) SendRaw ¶
func (c *Connection) SendRaw(msg string) error
SendRaw sends a string as a raw irc message
func (*Connection) SendUser ¶
func (c *Connection) SendUser(user, realname string)
SendUser sends a USER command for the network
Click to show internal directories.
Click to hide internal directories.