summaryrefslogtreecommitdiffstats
path: root/bridge/sshchat
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/sshchat
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/sshchat')
-rw-r--r--bridge/sshchat/sshchat.go16
1 files changed, 5 insertions, 11 deletions
diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go
index becb688c..81e83244 100644
--- a/bridge/sshchat/sshchat.go
+++ b/bridge/sshchat/sshchat.go
@@ -10,11 +10,9 @@ import (
)
type Bsshchat struct {
- r *bufio.Scanner
- w io.WriteCloser
- Config *config.Protocol
- Remote chan config.Message
- Account string
+ r *bufio.Scanner
+ w io.WriteCloser
+ *config.BridgeConfig
}
var flog *log.Entry
@@ -24,12 +22,8 @@ func init() {
flog = log.WithFields(log.Fields{"module": protocol})
}
-func New(cfg config.Protocol, account string, c chan config.Message) *Bsshchat {
- b := &Bsshchat{}
- b.Config = &cfg
- b.Account = account
- b.Remote = c
- return b
+func New(cfg *config.BridgeConfig) *Bsshchat {
+ return &Bsshchat{BridgeConfig: cfg}
}
func (b *Bsshchat) Connect() error {