fix kill messages not being exposed in the client
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
efca16f188
commit
818bee77dd
3
TODO.txt
3
TODO.txt
@ -30,9 +30,6 @@ WISHLIST
|
||||
|
||||
- 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
|
||||
|
12
server.go
12
server.go
@ -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
|
||||
|
||||
} else {
|
||||
s.reply(rplKill, "Can't change nicks on this server", "")
|
||||
s.reply(rplKill, "Can't change nicks on this server.")
|
||||
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.
|
||||
|
||||
if s.clientState != CSUnregistered {
|
||||
s.reply(rplKill, "You're already registered.", "")
|
||||
s.reply(rplKill, "You're already registered.")
|
||||
s.DisconnectClient()
|
||||
return
|
||||
}
|
||||
@ -404,11 +404,11 @@ func (s *Server) handleRegisteredCommand(command string, args []string) {
|
||||
|
||||
case "0":
|
||||
// Quitting all channels? Drop client
|
||||
s.reply(rplKill, "Bye.", "")
|
||||
s.reply(rplKill, "Bye.")
|
||||
s.DisconnectClient()
|
||||
|
||||
default:
|
||||
s.reply(rplKill, "There is only '"+BLESSED_CHANNEL+"'.", "")
|
||||
s.reply(rplKill, "There is only '"+BLESSED_CHANNEL+"'.")
|
||||
s.DisconnectClient()
|
||||
}
|
||||
|
||||
@ -693,8 +693,10 @@ func (s *Server) reply(code replyCode, args ...string) {
|
||||
|
||||
case rplNickChange:
|
||||
s.writeClient(fmt.Sprintf(":%s NICK %s", args[0], args[1]))
|
||||
|
||||
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:
|
||||
for _, itm := range strings.Split(args[2], "\n") {
|
||||
|
Loading…
Reference in New Issue
Block a user