mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2025-01-03 11:20:08 -05:00
19 lines
346 B
Go
19 lines
346 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
|
|
}
|
|
|
|
client.send <- "Invalid request"
|
|
client.Close()
|
|
}
|