mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-28 01:38:10 -07:00
client: Send quit message to friends correctly
This commit is contained in:
+6
-4
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user