3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-14 07:59:31 +01:00

Fix KLINE quit/error message and corrects comment on Client.Quit

This commit is contained in:
Daniel Oaks 2017-10-16 10:48:05 +10:00
parent 7ccb485b50
commit 8910dc59ee
2 changed files with 2 additions and 2 deletions

View File

@ -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) { func (client *Client) Quit(message string) {
client.stateMutex.Lock() client.stateMutex.Lock()
alreadyQuit := client.isQuitting alreadyQuit := client.isQuitting

View File

@ -415,7 +415,7 @@ func (server *Server) tryRegister(c *Client) {
if info.Time != nil { if info.Time != nil {
reason += fmt.Sprintf(" [%s]", info.Time.Duration.String()) 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() c.destroy()
return return
} }