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:
parent
7ccb485b50
commit
8910dc59ee
@ -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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user