correct PONG replies
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
92cb940d45
commit
e78ae227d6
2
TODO.txt
2
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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user