summaryrefslogtreecommitdiff
path: root/irc/session.go
diff options
context:
space:
mode:
Diffstat (limited to 'irc/session.go')
-rw-r--r--irc/session.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/irc/session.go b/irc/session.go
index e50312f..dabec03 100644
--- a/irc/session.go
+++ b/irc/session.go
@@ -5,6 +5,7 @@ import (
"encoding/base64"
"errors"
"fmt"
+ "sort"
"strconv"
"strings"
"time"
@@ -207,6 +208,7 @@ func (s *Session) Users() []string {
// Names returns the list of users in the given channel, or nil if this channel
// is not known by the session.
+// The list is sorted according to member name.
func (s *Session) Names(channel string) []Member {
var names []Member
if c, ok := s.channels[s.Casemap(channel)]; ok {
@@ -218,6 +220,7 @@ func (s *Session) Names(channel string) []Member {
})
}
}
+ sort.Sort(members(names))
return names
}