From 25dc161348d7ea224bd6a744cf8f6430ddc95990 Mon Sep 17 00:00:00 2001
From: Ken Piper <kealper@gmail.com>
Date: Sat, 13 Dec 2014 10:57:38 -0500
Subject: [PATCH] Block the broadcast of an empty message

---
 client.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/client.go b/client.go
index 33bd4f7..7b41907 100644
--- a/client.go
+++ b/client.go
@@ -56,7 +56,7 @@ func NewClient(server *Server, conn *ssh.ServerConn) *Client {
 }
 
 func (c *Client) ColoredName() string {
-    return ColorString(c.Color, c.Name)	
+    return ColorString(c.Color, c.Name)
 }
 
 func (c *Client) Write(msg string) {
@@ -229,7 +229,7 @@ func (c *Client) handleShell(channel ssh.Channel) {
 		}
 
 		msg := fmt.Sprintf("%s: %s", c.ColoredName(), line)
-		if c.IsSilenced() || len(msg) > 1000 {
+		if c.IsSilenced() || len(msg) > 1000 || len(line) < 1 {
 			c.Msg <- fmt.Sprintf("-> Message rejected.")
 			continue
 		}