chore: add SSHCHAT_SYSTEMBELL env support

This commit is contained in:
izenynn 2022-07-07 13:21:28 +02:00
parent 68e9d6880d
commit 21120a5aa6

10
host.go
View File

@ -169,6 +169,16 @@ func (h *Host) Connect(term *sshd.Terminal) {
if msg, ok := message.NewPublicMsg(cmd, user).ParseCommand(); ok {
h.Room.HandleMsg(msg)
}
case "SSHCHAT_SYSTEMBELL":
if e.Value != "" && e.Value != "0" {
cmd := "/systembell"
if e.Value != "1" {
cmd += " " + e.Value
}
if msg, ok := message.NewPublicMsg(cmd, user).ParseCommand(); ok {
h.Room.HandleMsg(msg)
}
}
}
}