From e307069d62ec6ea852c74329f4a6f135135394f7 Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 6 Jun 2018 00:51:42 +0200 Subject: [PATCH] Ignore messages from ourself. (sshchat) Closes #439 --- bridge/sshchat/sshchat.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridge/sshchat/sshchat.go b/bridge/sshchat/sshchat.go index 343fc66a..6e879e84 100644 --- a/bridge/sshchat/sshchat.go +++ b/bridge/sshchat/sshchat.go @@ -120,6 +120,10 @@ func (b *Bsshchat) handleSshChat() error { wait := true for { if b.r.Scan() { + // ignore messages from ourselves + if !strings.Contains(b.r.Text(), "\033[K") { + continue + } res := strings.Split(stripPrompt(b.r.Text()), ":") if res[0] == "-> Set theme" { wait = false