diff options
Diffstat (limited to 'irc')
-rw-r--r-- | irc/states.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/irc/states.go b/irc/states.go index c702c43..98b05d4 100644 --- a/irc/states.go +++ b/irc/states.go @@ -265,6 +265,14 @@ func (s *Session) Casemap(name string) string { return CasemapASCII(name) } +func (s *Session) Users() []string { + users := make([]string, 0, len(s.users)) + for _, u := range s.users { + users = append(users, u.Name.Name) + } + return users +} + func (s *Session) Names(channel string) []Member { var names []Member if c, ok := s.channels[s.Casemap(channel)]; ok { |