summaryrefslogtreecommitdiffstats
path: root/bridge/irc/irc.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-12-19 23:15:03 +0100
committerWim <wim@42.be>2017-12-19 23:15:03 +0100
commit265457b45171dcae96a1aac9454e3bda2cd0557a (patch)
tree35342a6b83e01b708b20442378799c7692fdf519 /bridge/irc/irc.go
parent4a4a29c9f6fe202cf4379c0df2ba313848bb8d11 (diff)
downloadmatterbridge-msglm-265457b45171dcae96a1aac9454e3bda2cd0557a.tar.gz
matterbridge-msglm-265457b45171dcae96a1aac9454e3bda2cd0557a.tar.bz2
matterbridge-msglm-265457b45171dcae96a1aac9454e3bda2cd0557a.zip
Refactor and add MediaDownloadSize to General
Diffstat (limited to 'bridge/irc/irc.go')
-rw-r--r--bridge/irc/irc.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index b493997a..c9c8cbb2 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -25,12 +25,11 @@ type Birc struct {
i *girc.Client
Nick string
names map[string][]string
- Config *config.Protocol
- Remote chan config.Message
connected chan struct{}
Local chan config.Message // local queue for flood control
- Account string
FirstConnection bool
+
+ *config.BridgeConfig
}
var flog *log.Entry
@@ -40,13 +39,11 @@ func init() {
flog = log.WithFields(log.Fields{"module": protocol})
}
-func New(cfg config.Protocol, account string, c chan config.Message) *Birc {
+func New(cfg *config.BridgeConfig) *Birc {
b := &Birc{}
- b.Config = &cfg
+ b.BridgeConfig = cfg
b.Nick = b.Config.Nick
- b.Remote = c
b.names = make(map[string][]string)
- b.Account = account
b.connected = make(chan struct{})
if b.Config.MessageDelay == 0 {
b.Config.MessageDelay = 1300