SSH-Chat: Trim newlines in the end of relayed messages

This commit is contained in:
ValdikSS
2019-01-05 16:31:36 +03:00
parent 475e69b3a3
commit 5594beca58

View File

@@ -136,7 +136,7 @@ func (b *Bsshchat) handleSSHChat() error {
}
if !wait {
b.Log.Debugf("<= Message %#v", res)
rmsg := config.Message{Username: res[0], Text: strings.Join(res[1:], ":"), Channel: "sshchat", Account: b.Account, UserID: "nick"}
rmsg := config.Message{Username: res[0], Text: strings.TrimSpace(strings.Join(res[1:], ":")), Channel: "sshchat", Account: b.Account, UserID: "nick"}
b.Remote <- rmsg
}
}