diff --git a/TODO.txt b/TODO.txt index 82abb0a..76200f2 100644 --- a/TODO.txt +++ b/TODO.txt @@ -9,6 +9,8 @@ PRE-RELEASE - andchat: system message styling +- andchat: WHO list doesn't get /cleared/ on room quit+autojoin + - part all nicks upon upstream server disconnection - test the current password auth diff --git a/server.go b/server.go index 92260e3..a5531d9 100644 --- a/server.go +++ b/server.go @@ -198,7 +198,7 @@ func (s *Server) handleCommand(command string, args []string) { switch command { case "PING": - s.reply(rplPong) + s.reply(rplPong, strings.Join(args, " ")) case "PONG": // 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])) case rplVersion: s.writeClient(fmt.Sprintf(":%s 351 %s %s", s.name, s.upstreamLauncher.Self.Nick, args[0])) + case rplMOTDStart: s.writeClient(fmt.Sprintf(":%s 375 %s :- Message of the day - ", s.name, s.upstreamLauncher.Self.Nick)) case rplMOTD: s.writeClient(fmt.Sprintf(":%s 372 %s :- %s", s.name, s.upstreamLauncher.Self.Nick, args[0])) case rplEndOfMOTD: s.writeClient(fmt.Sprintf(":%s 376 %s :- End of MOTD", s.name, s.upstreamLauncher.Self.Nick)) + 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: s.writeClient(fmt.Sprintf(":%s 461 %s :Not enough params", s.name, s.upstreamLauncher.Self.Nick)) case errNoNick: