mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-11-08 02:02:36 +03:00
More me fixen.
This commit is contained in:
1 parent
da48b9da8a
commit
30dd775fef
1 file changed
+5
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user