mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
client: Send quit message to friends correctly
This commit is contained in:
parent
9314edd405
commit
2e2e91689a
@ -416,6 +416,12 @@ func (client *Client) destroy() {
|
||||
// remove my monitors
|
||||
client.clearMonitorList()
|
||||
|
||||
// send quit messages to friends
|
||||
for friend := range client.Friends() {
|
||||
//TODO(dan): store quit message in user, if exists use that instead here
|
||||
friend.Send(nil, client.nickMaskString, "QUIT", "Exited")
|
||||
}
|
||||
|
||||
// clean up channels
|
||||
for channel := range client.channels {
|
||||
channel.Quit(client)
|
||||
@ -433,10 +439,6 @@ func (client *Client) destroy() {
|
||||
}
|
||||
|
||||
client.socket.Close()
|
||||
for friend := range client.Friends() {
|
||||
//TODO(dan): store quit message in user, if exists use that instead here
|
||||
friend.Send(nil, client.nickMaskString, "QUIT", "Exited")
|
||||
}
|
||||
}
|
||||
|
||||
// SendFromClient sends an IRC line coming from a specific client.
|
||||
|
Loading…
Reference in New Issue
Block a user