remove workshop prefix
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4b7f1cc64a
commit
6fddd532c2
1 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"git.snrd.de/Spaenny/steamServer"
|
"git.snrd.de/Spaenny/steamServer"
|
||||||
"git.snrd.de/Spaenny/steamServer/postgres"
|
"git.snrd.de/Spaenny/steamServer/postgres"
|
||||||
|
@ -92,6 +93,13 @@ func updateServers(host string, store steamServer.Store) {
|
||||||
|
|
||||||
log.Printf("%s - %s\n", host, info.Name)
|
log.Printf("%s - %s\n", host, info.Name)
|
||||||
|
|
||||||
|
// Some Servers use workshop maps and add a prefix, we don't need that
|
||||||
|
if strings.HasPrefix(info.Map, "workshop/") {
|
||||||
|
mapSplit := strings.Split(info.Map, "/")
|
||||||
|
info.Map = mapSplit[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
server := steamServer.Server {
|
server := steamServer.Server {
|
||||||
AppID: info.ID,
|
AppID: info.ID,
|
||||||
Name: info.Name,
|
Name: info.Name,
|
||||||
|
|
Reference in a new issue