From a0372bec9d2f4e3f134c58b5738e6256818fe5e4 Mon Sep 17 00:00:00 2001 From: cwkoh Date: Wed, 14 Dec 2022 14:57:09 +0900 Subject: [PATCH] =?UTF-8?q?-port=20=ED=94=84=EB=A1=9C=EA=B7=B8=EB=9E=A8=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0?= =?UTF-8?q?=EA=B0=80=20=EC=9E=98=20=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20flag=20parse=20=ED=95=98=EB=8A=94=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/AeGameServer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/AeGameServer.go b/core/AeGameServer.go index 0314b59..b07b96c 100644 --- a/core/AeGameServer.go +++ b/core/AeGameServer.go @@ -3,6 +3,7 @@ package core import ( "anvil/shared" "bytes" + "flag" "fmt" "io" "io/ioutil" @@ -77,6 +78,9 @@ func (gs *AeGameServer) Version() string { // New : func New() (*AeGameServer, error) { + if !flag.Parsed() { + flag.Parse() + } logfilename := fmt.Sprintf("AEGS_%s.log", time.Now().Format("2006-01-02T15-04-05")) logFile, err := os.OpenFile(logfilename, os.O_CREATE|os.O_WRONLY|os.O_CREATE, 0666)