diff --git a/irc/client.go b/irc/client.go index ae2d2758..d8f1db6d 100644 --- a/irc/client.go +++ b/irc/client.go @@ -475,7 +475,7 @@ func (client *Client) RplISupport() { } } -// Quit sends the given quit message to the client (but does not destroy them). +// Quit sets the given quit message for the client and tells the client to quit out. func (client *Client) Quit(message string) { client.stateMutex.Lock() alreadyQuit := client.isQuitting diff --git a/irc/server.go b/irc/server.go index 8ebec841..64432f15 100644 --- a/irc/server.go +++ b/irc/server.go @@ -415,7 +415,7 @@ func (server *Server) tryRegister(c *Client) { if info.Time != nil { reason += fmt.Sprintf(" [%s]", info.Time.Duration.String()) } - c.Send(nil, "", "ERROR", fmt.Sprintf("You are banned from this server (%s)", reason)) + c.Quit(fmt.Sprintf("You are banned from this server (%s)", reason)) c.destroy() return }