Browse Source

client: Fixed auto-rejoin trying to rejoin when there's no channels to rejoin.

master
Gisle Aune 6 years ago
parent
commit
992d71dde4
  1. 6
      client.go

6
client.go

@ -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()
if len(channels) > 0 {
client.Sendf("JOIN %s", strings.Join(channels, ","))
client.EmitNonBlocking(rejoinEvent)
}
client.EmitNonBlocking(NewEvent("hook", "ready"))
}
}

Loading…
Cancel
Save