This commit is contained in:
poiuty 2022-08-15 13:12:00 +03:00
parent 30e7296135
commit ac13a3fab3

View file

@ -1,17 +1,17 @@
package main package main
import ( import (
"fmt"
"github.com/gorilla/websocket"
"net/http"
"net/url"
"strings"
"time"
"regexp"
"bytes" "bytes"
"context" "context"
"fmt"
"github.com/gorilla/websocket"
"io/ioutil" "io/ioutil"
"net/http"
"net/url"
"regexp"
"strconv" "strconv"
"strings"
"time"
) )
var uptime = time.Now().Unix() var uptime = time.Now().Unix()
@ -74,7 +74,7 @@ func mapRooms() {
for { for {
select { select {
case m := <-rooms.Add: case m := <-rooms.Add:
data[m.room] = &Info{Id: m.Id, Server: m.Server, Proxy: m.Proxy, Start: m.Start, Last: m.Last, Online: m.Online, Income: m.Income, Dons: m.Dons, Tips: m.Tips, ch: m.ch} data[m.room] = &Info{Id: m.Id, Rid: m.Rid, Server: m.Server, Proxy: m.Proxy, Start: m.Start, Last: m.Last, Online: m.Online, Income: m.Income, Dons: m.Dons, Tips: m.Tips, ch: m.ch}
case s := <-rooms.Json: case s := <-rooms.Json:
j, err := json.Marshal(data) j, err := json.Marshal(data)