export GetNicks

This commit is contained in:
blackbeard420 2020-09-03 23:39:43 -04:00
parent e6ff641232
commit be0368e9ea

5
irc.go
View File

@ -109,6 +109,11 @@ func (c *Connection) DelayedSend(sock net.Conn, dur time.Duration, channel, msg
c.SendPrivmsg(channel, msg)
}
//GetNicks returns a array of all nicks in a channel
func (c *Connection) GetNicks(channel string) []string {
return c.userList[channel]
}
//NewConnection creates and connects an Connection
func NewConnection(server, nick, user string, pass *string, chans []string) *Connection {
irc := &Connection{channels: chans, userList: map[string][]string{}}