diff --git a/web/data.go b/web/data.go index d977d38..a8520b8 100644 --- a/web/data.go +++ b/web/data.go @@ -145,6 +145,15 @@ func (s *Server) handleGetServersJSON(c *gin.Context) { ClientsConnectionAllowed: 99, IsSweatbox: isSweatbox, }, + { + Ident: "AUTOMATIC", + HostnameOrIp: serverHostname, + Location: serverLocation, + Name: serverIdent, + ClientConnectionsAllowed: true, + ClientsConnectionAllowed: 99, + IsSweatbox: isSweatbox, + }, } res, err := json.Marshal(&dataJson) @@ -190,6 +199,15 @@ func (s *Server) generateServersTxt() (txt string, err error) { ClientsConnectionAllowed: 99, IsSweatbox: false, }, + { + Ident: "AUTOMATIC", + HostnameOrIp: serverHostname, + Location: serverLocation, + Name: serverIdent, + ClientConnectionsAllowed: true, + ClientsConnectionAllowed: 99, + IsSweatbox: false, + }, } buf := bytes.Buffer{} diff --git a/web/data_templates/servers.txt b/web/data_templates/servers.txt index e4e7661..5dbed2c 100644 --- a/web/data_templates/servers.txt +++ b/web/data_templates/servers.txt @@ -7,6 +7,7 @@ CONNECTED CLIENTS = 1 ; ; !SERVERS: -{{ range . }}{{ .Ident }}:{{ .HostnameOrIp }}:{{ .Location }}:{{ .Ident }}:{{ .ClientsConnectionAllowed }}:{{ end }} +{{ range $index, $element := . }}{{ if $index }} +{{ end }}{{ $element.Ident }}:{{ $element.HostnameOrIp }}:{{ $element.Location }}:{{ $element.Name }}:{{ $element.ClientsConnectionAllowed }}:{{ end }} ; ; END