summaryrefslogtreecommitdiff
path: root/irc/states.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2020-11-19 16:08:38 +0100
committerHubert Hirtz <hubert@hirtz.pm>2020-11-19 16:08:38 +0100
commit83e0e82ad08adeb910c13e4a53336cbf422356c9 (patch)
tree662ab140d62759c03dfef7a9be5eb6234d0c987e /irc/states.go
parentMove editor view when completing text (diff)
Add completion for /msg
Diffstat (limited to 'irc/states.go')
-rw-r--r--irc/states.go8
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 {