mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2024-12-22 13:13:00 -05:00
17 lines
321 B
Go
17 lines
321 B
Go
package chat
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func ClientMessageHandler(client *Client, msg string) {
|
|
splitMsg := strings.Split(msg, " ")
|
|
if len(splitMsg) == 2 && splitMsg[0] == "JOIN" {
|
|
client.send <- "OK"
|
|
client.FollowingStreamers[splitMsg[1]] = true
|
|
FollowStreamer(splitMsg[1])
|
|
return
|
|
} else {
|
|
client.Close()
|
|
}
|
|
}
|