mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-07-21 21:14:33 +02:00
Changed /color to /theme and made mono theme default.
This commit is contained in:
parent
c88c30391d
commit
0fd74cb163
17
client.go
17
client.go
@ -71,7 +71,6 @@ func NewClient(server *Server, conn *ssh.ServerConn) *Client {
|
|||||||
Msg: make(chan string, MSG_BUFFER),
|
Msg: make(chan string, MSG_BUFFER),
|
||||||
ready: make(chan struct{}, 1),
|
ready: make(chan struct{}, 1),
|
||||||
lastTX: time.Now(),
|
lastTX: time.Now(),
|
||||||
colorMe: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,13 +336,17 @@ func (c *Client) handleShell(channel ssh.Channel) {
|
|||||||
c.Server.SetMotd(c, newmotd)
|
c.Server.SetMotd(c, newmotd)
|
||||||
c.Server.MotdBroadcast(c)
|
c.Server.MotdBroadcast(c)
|
||||||
}
|
}
|
||||||
case "/color":
|
case "/theme":
|
||||||
c.colorMe = !c.colorMe
|
if len(parts) < 2 {
|
||||||
c.Rename(c.Name)
|
c.SysMsg("Missing $THEME from: /theme $THEME")
|
||||||
if c.colorMe {
|
c.SysMsg("Choose either color or mono")
|
||||||
c.SysMsg("Turned on color chat")
|
|
||||||
} else {
|
} 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:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user