From ffae72db7aa5eeeac3bead8c0f505b73f4e2b6a4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 19 Jun 2016 20:22:22 +0300 Subject: hercules: fix parsing warps in new tmwa format (missing wap name). --- hercules/convert_server.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'hercules/convert_server.py') diff --git a/hercules/convert_server.py b/hercules/convert_server.py index f323b4e..6f0f5ba 100755 --- a/hercules/convert_server.py +++ b/hercules/convert_server.py @@ -4,12 +4,28 @@ # Copyright (C) 2014 Evol Online # Author: Andrei Karas (4144) +import sys + from code.serverutils import * from code.server.evol.main import * from code.server.tmw.main import * -serverType = detectServerType() +def showHelp(): + print "Usage: ./convert_server.py evol" + print " ./convert_server.py tmwold" + print " ./convert_server.py tmwnew" + exit(1) + +if len(sys.argv) != 2: + showHelp() + exit(1) + +serverType = sys.argv[1] if serverType == "evol": serverEvolMain(); +elif serverType == "tmwold": + serverTmwMain(False); +elif serverType == "tmwnew": + serverTmwMain(True); else: - serverTmwMain(); + print "Wrong parameter" \ No newline at end of file -- cgit v1.2.3-70-g09d2