forked from The-Alpha-Project/alpha-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
30 lines (21 loc) · 852 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from multiprocessing import Process
import colorama
from sys import platform
from game.realm import RealmManager
from game.world import WorldManager
from utils.ConfigManager import config
from database.realm.RealmDatabaseManager import RealmDatabaseManager
from utils.Logger import Logger
if __name__ == '__main__':
# Initialize colorama
colorama.init()
if platform != 'win32':
from signal import signal, SIGPIPE, SIG_DFL
# https://stackoverflow.com/a/30091579
signal(SIGPIPE, SIG_DFL)
login_process = Process(target=RealmManager.LoginServerSessionHandler.start)
login_process.start()
proxy_process = Process(target=RealmManager.ProxyServerSessionHandler.start)
proxy_process.start()
world_process = Process(target=WorldManager.WorldServerSessionHandler.start)
world_process.start()