initial attempt at exposing op status
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
3cda342302
commit
a5f4bc2535
14
server.go
14
server.go
@ -484,19 +484,23 @@ func (s *Server) DisconnectClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) sendNames() {
|
func (s *Server) sendNames() {
|
||||||
names := s.upstreamLauncher.Self.Nick // always include ourselves
|
|
||||||
|
nameList := make([]string, 0)
|
||||||
|
|
||||||
if s.upstream != nil {
|
if s.upstream != nil {
|
||||||
s.upstream.Users(func(u *map[string]libnmdc.UserInfo) error {
|
s.upstream.Users(func(u *map[string]libnmdc.UserInfo) error {
|
||||||
for nick, _ := range *u {
|
for nick, nickinfo := range *u {
|
||||||
if nick != s.upstreamLauncher.Self.Nick { // but don't repeat ourselves
|
if nickinfo.IsOperator {
|
||||||
names += " " + nick
|
nameList = append(nameList, "@"+nick)
|
||||||
|
} else {
|
||||||
|
nameList = append(nameList, nick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
s.reply(rplNames, BLESSED_CHANNEL, names)
|
s.reply(rplNames, BLESSED_CHANNEL, strings.Join(nameList, " "))
|
||||||
s.reply(rplEndOfNames, BLESSED_CHANNEL)
|
s.reply(rplEndOfNames, BLESSED_CHANNEL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user