[core] Fix: Newly initialized bots crash when not authorized yet

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-03-14 15:56:29 +01:00
parent c5d83f9b77
commit caadb6b590
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -344,7 +344,10 @@ func main() {
continue continue
} }
ircHdl.ExecuteJoins(config.Channels) if ircHdl != nil {
ircHdl.ExecuteJoins(config.Channels)
}
for _, c := range config.Channels { for _, c := range config.Channels {
if err := twitchWatch.AddChannel(c); err != nil { if err := twitchWatch.AddChannel(c); err != nil {
log.WithError(err).WithField("channel", c).Error("Unable to add channel to watcher") log.WithError(err).WithField("channel", c).Error("Unable to add channel to watcher")