fix kill messages not being exposed in the client

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-08 14:07:36 +12:00
parent efca16f188
commit 818bee77dd
2 changed files with 7 additions and 8 deletions

View File

@ -30,9 +30,6 @@ WISHLIST
- support SASL PLAIN authentication as well as just classic PASS - support SASL PLAIN authentication as well as just classic PASS
- KILL messages not being exposed in client(?)
2016/05/07 22:51:33 <<< :Your nickname is already being used KILL A
REF REF

View File

@ -320,7 +320,7 @@ func (s *Server) handleCommand(command string, args []string) {
// Required for compatibility with Lite IRC, which sends USER/NICK in the wrong order // Required for compatibility with Lite IRC, which sends USER/NICK in the wrong order
} else { } else {
s.reply(rplKill, "Can't change nicks on this server", "") s.reply(rplKill, "Can't change nicks on this server.")
s.DisconnectClient() s.DisconnectClient()
} }
@ -329,7 +329,7 @@ func (s *Server) handleCommand(command string, args []string) {
// It's the final step in a PASS/NICK/USER login handshake. // It's the final step in a PASS/NICK/USER login handshake.
if s.clientState != CSUnregistered { if s.clientState != CSUnregistered {
s.reply(rplKill, "You're already registered.", "") s.reply(rplKill, "You're already registered.")
s.DisconnectClient() s.DisconnectClient()
return return
} }
@ -404,11 +404,11 @@ func (s *Server) handleRegisteredCommand(command string, args []string) {
case "0": case "0":
// Quitting all channels? Drop client // Quitting all channels? Drop client
s.reply(rplKill, "Bye.", "") s.reply(rplKill, "Bye.")
s.DisconnectClient() s.DisconnectClient()
default: default:
s.reply(rplKill, "There is only '"+BLESSED_CHANNEL+"'.", "") s.reply(rplKill, "There is only '"+BLESSED_CHANNEL+"'.")
s.DisconnectClient() s.DisconnectClient()
} }
@ -693,8 +693,10 @@ func (s *Server) reply(code replyCode, args ...string) {
case rplNickChange: case rplNickChange:
s.writeClient(fmt.Sprintf(":%s NICK %s", args[0], args[1])) s.writeClient(fmt.Sprintf(":%s NICK %s", args[0], args[1]))
case rplKill: case rplKill:
s.writeClient(fmt.Sprintf(":%s KILL %s A %s", args[0], s.clientNick(), args[1])) s.writeClient(fmt.Sprintf(":%s KILL %s %s", s.name, s.clientNick(), args[0]))
// s.writeClient(fmt.Sprintf(":%s KILL %s A %s", args[0], s.clientNick(), args[1]))
case rplMsg: case rplMsg:
for _, itm := range strings.Split(args[2], "\n") { for _, itm := range strings.Split(args[2], "\n") {