From 6f001cf6ba70ac3af186786f08246316245f9ecf Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sat, 8 Nov 2014 13:39:50 -0500 Subject: [PATCH] silence negative scan results --- system.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system.go b/system.go index 445ee1a..770f706 100644 --- a/system.go +++ b/system.go @@ -78,6 +78,7 @@ func (s *System) Bombed(bomber *Connection) { conn.Die() bomber.MadeKill(conn) }) + s.colonizedBy = nil for id, _ := range index { if id == s.id { @@ -192,9 +193,6 @@ func (r *scanResults) negative() bool { } func (r *scanResults) String() string { - if r.negative() { - return "negative" - } if r.life { return "life detected" } @@ -224,6 +222,9 @@ func deliverReply(id int, echo int, results *scanResults) { delay := system.TimeTo(source) log_info("echo received at %s reflected from %s after traveling for %v", system.name, source.name, delay) system.EachConn(func(conn *Connection) { + if results.negative() { + return + } fmt.Fprintf(conn, "scan results from %s (%v away): %v\n", source.name, delay, results) }) }