whois: better output format
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
3cffacaa45
commit
0ec1c20d7e
@ -675,7 +675,7 @@ func (s *Server) handleJoinedCommand(command string, args []string) {
|
||||
s.upstream.Users(func(u *map[string]libnmdc.UserInfo) error {
|
||||
for nick, nickinfo := range *u {
|
||||
if nick == targetnick {
|
||||
s.reply(rplWhoisUser, nick, nickinfo.Description+" <"+nickinfo.ClientVersion+">")
|
||||
s.reply(rplWhoisUser, nick, nickinfo.Description+" <"+nickinfo.ClientTag+" V:"+nickinfo.ClientVersion+">")
|
||||
if nickinfo.IsOperator {
|
||||
s.reply(rplWhoisOperator, nick)
|
||||
}
|
||||
@ -845,7 +845,7 @@ func (s *Server) reply(code replyCode, args ...string) {
|
||||
s.writeClient(fmt.Sprintf(":%s PONG %s %s", s.name, s.clientNick(), args[0]))
|
||||
|
||||
case rplWhoisUser:
|
||||
s.writeClient(fmt.Sprintf(":%s 311 %s %s %s * :%s", s.name, args[0], args[0], args[0], args[1])) // caller should supply nick,description
|
||||
s.writeClient(fmt.Sprintf(":%s 311 %s %s %s %s * :%s", s.name, args[0], args[0], args[0], s.name, args[1])) // caller should supply nick,description
|
||||
case rplWhoisOperator:
|
||||
s.writeClient(fmt.Sprintf(":%s 313 %s :is an IRC operator", s.name, args[0]))
|
||||
case rplEndOfWhois:
|
||||
|
Loading…
Reference in New Issue
Block a user