mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-13 15:47:17 +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":
|
||||
c.WriteLines(strings.Split(ABOUT_TEXT, "\n"))
|
||||
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() {
|
||||
c.Msg <- fmt.Sprintf("-> Message rejected, silenced.")
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user