diff options
author | Wim <wim@42.be> | 2020-11-22 22:44:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 22:44:15 +0100 |
commit | 0c19716f44799fe0ab31b933538bad46c8cce5b9 (patch) | |
tree | 7b53ceef6307bae8ecae7b11a4812bb69c41f8ff /bridge/irc/irc.go | |
parent | b24e1bafa180870646bec6b42450d3077b3facd2 (diff) | |
download | matterbridge-msglm-0c19716f44799fe0ab31b933538bad46c8cce5b9.tar.gz matterbridge-msglm-0c19716f44799fe0ab31b933538bad46c8cce5b9.tar.bz2 matterbridge-msglm-0c19716f44799fe0ab31b933538bad46c8cce5b9.zip |
Join on invite (irc). Fixes #1231 (#1306)
Diffstat (limited to 'bridge/irc/irc.go')
-rw-r--r-- | bridge/irc/irc.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 8470a1c3..2352fcd7 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -30,6 +30,7 @@ type Birc struct { Local chan config.Message // local queue for flood control FirstConnection, authDone bool MessageDelay, MessageQueue, MessageLength int + channels map[string]bool *bridge.Config } @@ -40,6 +41,8 @@ func New(cfg *bridge.Config) bridge.Bridger { b.Nick = b.GetString("Nick") b.names = make(map[string][]string) b.connected = make(chan error) + b.channels = make(map[string]bool) + if b.GetInt("MessageDelay") == 0 { b.MessageDelay = 1300 } else { @@ -112,6 +115,7 @@ func (b *Birc) Disconnect() error { } func (b *Birc) JoinChannel(channel config.ChannelInfo) error { + b.channels[channel.Name] = true // need to check if we have nickserv auth done before joining channels for { if b.authDone { |