mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-15 08:30:36 +03:00
More me fixen.
This commit is contained in:
parent
da48b9da8a
commit
30dd775fef
@ -126,7 +126,11 @@ func (c *Client) handleShell(channel ssh.Channel) {
|
|||||||
case "/about":
|
case "/about":
|
||||||
c.WriteLines(strings.Split(ABOUT_TEXT, "\n"))
|
c.WriteLines(strings.Split(ABOUT_TEXT, "\n"))
|
||||||
case "/me":
|
case "/me":
|
||||||
msg := fmt.Sprintf("* %s %s", c.Name, line)
|
me := strings.TrimLeft(line, "/me")
|
||||||
|
if me == "" {
|
||||||
|
me = "is at a loss for words."
|
||||||
|
}
|
||||||
|
msg := fmt.Sprintf("** %s%s", c.Name, me)
|
||||||
if c.IsSilenced() {
|
if c.IsSilenced() {
|
||||||
c.Msg <- fmt.Sprintf("-> Message rejected, silenced.")
|
c.Msg <- fmt.Sprintf("-> Message rejected, silenced.")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user