summaryrefslogblamecommitdiff
path: root/hercules/convert_server.py
blob: f474baae58c80eb1fb4b51e456d7b3c9fcf8a4da (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                      










                                                


                                              







                        
                    
                            
                        
                            
                       
     
                           
#!/usr/bin/env python3
# -*- coding: utf8 -*-
#
# Copyright (C) 2014  Evol Online
# Author: Andrei Karas (4144)

import sys

from code.server.evol.main import serverEvolMain
from code.server.tmw.main import serverTmwMain

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:
    print("Wrong parameter")