|
|
@ -27,6 +27,8 @@ func handleIncomingMessage(who *websocket.Conn, msg string) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !connectedUsers[message[1]] {
|
|
|
|
if !connectedUsers[message[1]] {
|
|
|
|
|
|
|
|
fmt.Println(message[1], "tried to connect. Disconnecting!")
|
|
|
|
|
|
|
|
fmt.Println(connectedUsers)
|
|
|
|
who.WriteMessage(websocket.TextMessage, []byte("leave "+message[1]))
|
|
|
|
who.WriteMessage(websocket.TextMessage, []byte("leave "+message[1]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|