From 0ec1c20d7eb5ffceebfee7d1601b6d12321d8d6c Mon Sep 17 00:00:00 2001 From: "." <.@.> Date: Sat, 27 Aug 2016 15:27:50 +1200 Subject: [PATCH] whois: better output format --HG-- branch : nmdc-ircfrontend --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 26f51a8..cb687e1 100644 --- a/server.go +++ b/server.go @@ -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: