summaryrefslogtreecommitdiff
path: root/hercules/convert_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'hercules/convert_server.py')
-rwxr-xr-xhercules/convert_server.py20
1 files changed, 18 insertions, 2 deletions
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