mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
Initial chat prototype
This commit is contained in:
@@ -2,7 +2,6 @@ package launcherserver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -12,13 +11,14 @@ import (
|
||||
"github.com/Andoryuuta/Erupe/config"
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Config struct allows configuring the server.
|
||||
type Config struct {
|
||||
Logger *zap.Logger
|
||||
DB *sql.DB
|
||||
DB *sqlx.DB
|
||||
ErupeConfig *config.Config
|
||||
UseOriginalLauncherFiles bool
|
||||
}
|
||||
@@ -28,7 +28,7 @@ type Server struct {
|
||||
sync.Mutex
|
||||
logger *zap.Logger
|
||||
erupeConfig *config.Config
|
||||
db *sql.DB
|
||||
db *sqlx.DB
|
||||
httpServer *http.Server
|
||||
useOriginalLauncherFiles bool
|
||||
isShuttingDown bool
|
||||
|
||||
@@ -13,7 +13,7 @@ func serverList(s *Server, w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w,
|
||||
`<?xml version="1.0"?><server_groups><group idx='0' nam='Erupe' ip='%s' port="%d"/></server_groups>`,
|
||||
s.erupeConfig.HostIP,
|
||||
s.erupeConfig.Entrance.Port,
|
||||
s.erupeConfig.Sign.Port,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user