From be0368e9eabc4ce2bd74ffaabf393c4f60093f10 Mon Sep 17 00:00:00 2001 From: blackbeard420 Date: Thu, 3 Sep 2020 23:39:43 -0400 Subject: [PATCH] export GetNicks --- irc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc.go b/irc.go index 5e7ddb8..43fac50 100644 --- a/irc.go +++ b/irc.go @@ -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{}}