diff options
Diffstat (limited to 'bridge/sshchat/sshchat.go')
-rw-r--r-- | bridge/sshchat/sshchat.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go index c11d3daa..3204d734 100644 --- a/bridge/sshchat/sshchat.go +++ b/bridge/sshchat/sshchat.go @@ -14,18 +14,18 @@ import ( type Bsshchat struct { r *bufio.Scanner w io.WriteCloser - *config.BridgeConfig + *bridge.Config } -func New(cfg *config.BridgeConfig) bridge.Bridger { - return &Bsshchat{BridgeConfig: cfg} +func New(cfg *bridge.Config) bridge.Bridger { + return &Bsshchat{Config: cfg} } func (b *Bsshchat) Connect() error { var err error - b.Log.Infof("Connecting %s", b.Config.Server) + b.Log.Infof("Connecting %s", b.GetString("Server")) go func() { - err = sshd.ConnectShell(b.Config.Server, b.Config.Nick, func(r io.Reader, w io.WriteCloser) error { + err = sshd.ConnectShell(b.GetString("Server"), b.GetString("Nick"), func(r io.Reader, w io.WriteCloser) error { b.r = bufio.NewScanner(r) b.w = w b.r.Scan() |