Add support for disabling chat. Closes #472 (#799)

This commit is contained in:
Gabe Kangas
2021-03-14 11:46:27 -07:00
committed by GitHub
parent 40264bec8c
commit bf33d08384
8 changed files with 183 additions and 97 deletions

View File

@@ -135,6 +135,10 @@ func (s *server) Listen() {
case c := <-s.delCh:
s.removeClient(c)
case msg := <-s.sendAllCh:
if data.GetChatDisabled() {
break
}
if !msg.Empty() {
// set defaults before sending msg to anywhere
msg.SetDefaults()