From 0fd74cb163d3c8d5710eed7e8bd26e01ad874580 Mon Sep 17 00:00:00 2001 From: empathetic-alligator Date: Sun, 14 Dec 2014 04:39:20 -0500 Subject: [PATCH] Changed /color to /theme and made mono theme default. --- client.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/client.go b/client.go index 2e07b38..827f436 100644 --- a/client.go +++ b/client.go @@ -71,7 +71,6 @@ func NewClient(server *Server, conn *ssh.ServerConn) *Client { Msg: make(chan string, MSG_BUFFER), ready: make(chan struct{}, 1), lastTX: time.Now(), - colorMe: true, } } @@ -337,13 +336,17 @@ func (c *Client) handleShell(channel ssh.Channel) { c.Server.SetMotd(c, newmotd) c.Server.MotdBroadcast(c) } - case "/color": - c.colorMe = !c.colorMe - c.Rename(c.Name) - if c.colorMe { - c.SysMsg("Turned on color chat") + case "/theme": + if len(parts) < 2 { + c.SysMsg("Missing $THEME from: /theme $THEME") + c.SysMsg("Choose either color or mono") } else { - c.SysMsg("Turned off color chat") + if parts[1] == "mono" { + c.colorMe = false + } else if parts[1] == "color" { + c.colorMe = true + } + c.Rename(c.Name) } default: