Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 418f4c2bb78c2ac43d18f861f2173630bff7c06d Author: Wim <wim@42.be> Date: Mon Mar 05 22:50:38 2018 +0000 Fix panic on sending messages between reconnects (irc). Closes #385 diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 8053bb4..0e81732 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -1596 +15911 @@ func (b *Birc) Send(msg config.Message) (string, error) {     b.Log.Debugf("=> Receiving %#v", msg)   + // we can be in between reconnects #385 + if !b.i.IsConnected() { + b.Log.Error("Not connected to server, dropping message") + } +   // Execute a command   if strings.HasPrefix(msg.Text, "!") {   b.Command(&msg)