Skip to content

Commit

Permalink
maps: Use the same port for HTTP and UDP.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Feb 18, 2024
1 parent c20126f commit 67a1e62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package common

const (
GamePort = 18590
GameHTTPPort = 18580
GameHTTPPort = GamePort
)
3 changes: 3 additions & 0 deletions maps/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"io"
"net/http"
"os"
"path"
"path/filepath"
"strings"
"time"
Expand Down Expand Up @@ -99,6 +100,8 @@ func (l *limitedReader) Read(p []byte) (n int, err error) {

// DownloadMap with a given name to dest.
func (c *Client) DownloadMap(ctx context.Context, dest string, name string) error {
name = filepath.ToSlash(name)
name = path.Base(name)
name = strings.TrimSuffix(strings.ToLower(name), Ext)
url := c.base + "/api/v0/maps/" + name + "/download"
Log.Println("GET", url)
Expand Down

0 comments on commit 67a1e62

Please sign in to comment.