correct PONG replies

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-07 18:58:19 +12:00
parent 92cb940d45
commit e78ae227d6
2 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,8 @@ PRE-RELEASE
- andchat: system message styling - andchat: system message styling
- andchat: WHO list doesn't get /cleared/ on room quit+autojoin
- part all nicks upon upstream server disconnection - part all nicks upon upstream server disconnection
- test the current password auth - test the current password auth

View File

@ -198,7 +198,7 @@ func (s *Server) handleCommand(command string, args []string) {
switch command { switch command {
case "PING": case "PING":
s.reply(rplPong) s.reply(rplPong, strings.Join(args, " "))
case "PONG": case "PONG":
// do nothing // do nothing
@ -571,14 +571,17 @@ func (s *Server) reply(code replyCode, args ...string) {
s.writeClient(fmt.Sprintf(":%s 371 %s :%s", s.name, s.upstreamLauncher.Self.Nick, args[0])) s.writeClient(fmt.Sprintf(":%s 371 %s :%s", s.name, s.upstreamLauncher.Self.Nick, args[0]))
case rplVersion: case rplVersion:
s.writeClient(fmt.Sprintf(":%s 351 %s %s", s.name, s.upstreamLauncher.Self.Nick, args[0])) s.writeClient(fmt.Sprintf(":%s 351 %s %s", s.name, s.upstreamLauncher.Self.Nick, args[0]))
case rplMOTDStart: case rplMOTDStart:
s.writeClient(fmt.Sprintf(":%s 375 %s :- Message of the day - ", s.name, s.upstreamLauncher.Self.Nick)) s.writeClient(fmt.Sprintf(":%s 375 %s :- Message of the day - ", s.name, s.upstreamLauncher.Self.Nick))
case rplMOTD: case rplMOTD:
s.writeClient(fmt.Sprintf(":%s 372 %s :- %s", s.name, s.upstreamLauncher.Self.Nick, args[0])) s.writeClient(fmt.Sprintf(":%s 372 %s :- %s", s.name, s.upstreamLauncher.Self.Nick, args[0]))
case rplEndOfMOTD: case rplEndOfMOTD:
s.writeClient(fmt.Sprintf(":%s 376 %s :- End of MOTD", s.name, s.upstreamLauncher.Self.Nick)) s.writeClient(fmt.Sprintf(":%s 376 %s :- End of MOTD", s.name, s.upstreamLauncher.Self.Nick))
case rplPong: case rplPong:
s.writeClient(fmt.Sprintf(":%s PONG %s %s", s.name, s.upstreamLauncher.Self.Nick, s.name)) s.writeClient(fmt.Sprintf(":%s PONG %s %s", s.name, s.upstreamLauncher.Self.Nick, args[0]))
case errMoreArgs: case errMoreArgs:
s.writeClient(fmt.Sprintf(":%s 461 %s :Not enough params", s.name, s.upstreamLauncher.Self.Nick)) s.writeClient(fmt.Sprintf(":%s 461 %s :Not enough params", s.name, s.upstreamLauncher.Self.Nick))
case errNoNick: case errNoNick: