summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-02-02 22:08:37 +0100
committerGitHub <noreply@github.com>2020-02-02 22:08:37 +0100
commit1bf46b771182ae34f07d6871e3676a0588e37641 (patch)
tree553bc46d5ee58a372a55f7140d0afd03ba27db86
parentb85bae31d98a599589504e303f3ca39a1e63a477 (diff)
downloadmatterbridge-msglm-1bf46b771182ae34f07d6871e3676a0588e37641.tar.gz
matterbridge-msglm-1bf46b771182ae34f07d6871e3676a0588e37641.tar.bz2
matterbridge-msglm-1bf46b771182ae34f07d6871e3676a0588e37641.zip
Fix duplicated messages (sshchat). Fixes #950 (#996)
-rw-r--r--bridge/sshchat/sshchat.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go
index 3a4512cb..6b78c223 100644
--- a/bridge/sshchat/sshchat.go
+++ b/bridge/sshchat/sshchat.go
@@ -130,6 +130,10 @@ func (b *Bsshchat) handleSSHChat() error {
if strings.Contains(b.r.Text(), "Rate limiting is in effect") {
continue
}
+ // skip our own messages
+ if !strings.HasPrefix(b.r.Text(), "["+b.GetString("Nick")+"] \x1b") {
+ continue
+ }
res := strings.Split(stripPrompt(b.r.Text()), ":")
if res[0] == "-> Set theme" {
wait = false