mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-27 22:02:16 +03:00
chore: add SSHCHAT_SYSTEMBELL env support
This commit is contained in:
parent
68e9d6880d
commit
21120a5aa6
10
host.go
10
host.go
@ -169,6 +169,16 @@ func (h *Host) Connect(term *sshd.Terminal) {
|
|||||||
if msg, ok := message.NewPublicMsg(cmd, user).ParseCommand(); ok {
|
if msg, ok := message.NewPublicMsg(cmd, user).ParseCommand(); ok {
|
||||||
h.Room.HandleMsg(msg)
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user