mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-31 06:34:14 +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
|
// remove my monitors
|
||||||
client.clearMonitorList()
|
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
|
// clean up channels
|
||||||
for channel := range client.channels {
|
for channel := range client.channels {
|
||||||
channel.Quit(client)
|
channel.Quit(client)
|
||||||
@ -433,10 +439,6 @@ func (client *Client) destroy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client.socket.Close()
|
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.
|
// SendFromClient sends an IRC line coming from a specific client.
|
||||||
|
Loading…
Reference in New Issue
Block a user