Demand a password

This commit is contained in:
Justin Hawkins 2020-11-21 14:00:39 +10:30
parent b0621bbb54
commit 571819a14b

View File

@ -4,7 +4,7 @@ import (
"github.com/tardisx/openttd-admin/pkg"
"flag"
"strings"
// "fmt"
"os"
)
@ -66,6 +66,11 @@ func main() {
flag.IntVar(&port, "port", 3977, "The port number of the admin interface (default is 3977)")
flag.Parse()
if password == "" {
println("ERROR: You must supply a password")
os.Exit(1)
}
server := admin.OpenTTDServer{}
for _, value := range daily {