beep newline fix.

This commit is contained in:
Andrey Petrov 2014-12-13 14:16:55 -08:00
parent cc01deb4bb
commit 7e8e72ce2b

View File

@ -89,10 +89,11 @@ func (s *Server) Broadcast(msg string, except *Client) {
continue
}
client.Send(msg)
if client.beepMe && strings.Contains(msg, client.Name) {
/* Add an ascii BEL to ding clients when they're mentioned */
client.Send(BEEP)
client.Send(msg + BEEP)
} else {
client.Send(msg)
}
}
}