mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-05-09 11:41:07 +03:00
feat: add bell sound to public msg
This commit is contained in:
parent
f62e591523
commit
cc26a3c05d
@ -215,6 +215,9 @@ func (u *User) render(m Message) string {
|
|||||||
return ""
|
return ""
|
||||||
} else {
|
} else {
|
||||||
out += m.RenderFor(cfg)
|
out += m.RenderFor(cfg)
|
||||||
|
if cfg.Systembell {
|
||||||
|
out += Bel
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case *PrivateMsg:
|
case *PrivateMsg:
|
||||||
out += m.Render(cfg.Theme)
|
out += m.Render(cfg.Theme)
|
||||||
@ -273,6 +276,7 @@ func (u *User) Send(m Message) error {
|
|||||||
type UserConfig struct {
|
type UserConfig struct {
|
||||||
Highlight *regexp.Regexp
|
Highlight *regexp.Regexp
|
||||||
Bell bool
|
Bell bool
|
||||||
|
Systembell bool
|
||||||
Quiet bool
|
Quiet bool
|
||||||
Echo bool // Echo shows your own messages after sending, disabled for bots
|
Echo bool // Echo shows your own messages after sending, disabled for bots
|
||||||
Timeformat *string
|
Timeformat *string
|
||||||
@ -286,6 +290,7 @@ var DefaultUserConfig UserConfig
|
|||||||
func init() {
|
func init() {
|
||||||
DefaultUserConfig = UserConfig{
|
DefaultUserConfig = UserConfig{
|
||||||
Bell: true,
|
Bell: true,
|
||||||
|
Systembell: false,
|
||||||
Echo: true,
|
Echo: true,
|
||||||
Quiet: false,
|
Quiet: false,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user