mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-24 18:25:40 +00:00
Fix panic on sending messages between reconnects (irc). Closes #385
This commit is contained in:
parent
fdd5ada98c
commit
9de9151826
@ -159,6 +159,11 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user