diff --git a/server.go b/server.go index 3a17eba..69825e8 100644 --- a/server.go +++ b/server.go @@ -484,19 +484,23 @@ func (s *Server) DisconnectClient() { } func (s *Server) sendNames() { - names := s.upstreamLauncher.Self.Nick // always include ourselves + + nameList := make([]string, 0) + if s.upstream != nil { s.upstream.Users(func(u *map[string]libnmdc.UserInfo) error { - for nick, _ := range *u { - if nick != s.upstreamLauncher.Self.Nick { // but don't repeat ourselves - names += " " + nick + for nick, nickinfo := range *u { + if nickinfo.IsOperator { + nameList = append(nameList, "@"+nick) + } else { + nameList = append(nameList, nick) } } return nil }) } - s.reply(rplNames, BLESSED_CHANNEL, names) + s.reply(rplNames, BLESSED_CHANNEL, strings.Join(nameList, " ")) s.reply(rplEndOfNames, BLESSED_CHANNEL) }