mirror of
https://github.com/gissleh/irc.git
synced 2026-09-29 00:05:34 +00:00
client: Fixed auto-rejoin trying to rejoin when there's no channels to rejoin.
This commit is contained in:
@@ -1078,7 +1078,7 @@ func (client *Client) handleEvent(event *Event) {
|
||||
client.handleInTargets(event.Nick, event)
|
||||
}
|
||||
|
||||
// Auto-join
|
||||
// Auto-rejoin
|
||||
case "packet.376", "packet.422":
|
||||
{
|
||||
client.mutex.RLock()
|
||||
@@ -1094,9 +1094,11 @@ func (client *Client) handleEvent(event *Event) {
|
||||
}
|
||||
client.mutex.RUnlock()
|
||||
|
||||
client.Sendf("JOIN %s", strings.Join(channels, ","))
|
||||
if len(channels) > 0 {
|
||||
client.Sendf("JOIN %s", strings.Join(channels, ","))
|
||||
client.EmitNonBlocking(rejoinEvent)
|
||||
}
|
||||
|
||||
client.EmitNonBlocking(rejoinEvent)
|
||||
client.EmitNonBlocking(NewEvent("hook", "ready"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user