Only send Chat and Event messages to temp clients

These should be the only messages that need to be sent to temp clients
for now.
This commit is contained in:
Zorchenhimer 2019-03-23 23:27:56 -04:00
parent 37cf2f7811
commit 87f8839a33
1 changed files with 5 additions and 0 deletions

View File

@ -328,6 +328,11 @@ func (cr *ChatRoom) Broadcast() {
go send(msg, client)
}
// Only send Chat and Event stuff to temp clients
if msg.Type != common.DTChat && msg.Type != common.DTEvent {
break
}
data, err := msg.ToJSON()
if err != nil {
fmt.Printf("Error converting ChatData to ChatDataJSON: %v\n", err)