import os
import app
import lokale
import debugInfo
CHINA_PORT = 50000
def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}
ridx = 1
for region, auth, mark, channels in orderList:
cidx = 1
channelDict = {}
for channel in channels:
key = ridx * 10 + cidx
channel["key"] = key
channelDict[cidx] = channel
cidx += 1
region["channel"] = channelDict
retRegion0[ridx] = region
retAuthAddrDict[ridx] = auth
retMarkAddrDict[ridx*10] = mark
ridx += 1
return retRegion0, retAuthAddrDict, retMarkAddrDict
app.ServerName = None
if (lokale.IsEUROPE() and app.GetLocalePath() == "lokale/tr"):
STATE_NONE = "..."
STATE_DICT = {
0 : "....",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":"CH1 ","ip":"185.19.94.211","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":12,"name":"CH2 ","ip":"185.19.94.212","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":13,"name":"CH3 ","ip":"185.19.94.212","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":14,"name":"CH4 ","ip":"185.19.94.212","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":15,"name":"CH5 ","ip":"185.19.94.212","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":16,"name":"CH6 ","ip":"185.19.94.212","tcp_port":29000,"udp_port":29000,"state":"...",},
7:{"key":17,"name":"CH7 ","ip":"185.19.94.212","tcp_port":37000,"udp_port":37000,"state":"...",},
8:{"key":18,"name":"CH8 ","ip":"185.19.94.212","tcp_port":38000,"udp_port":38000,"state":"...",},
}
SERVER02_CHANNEL_DICT = {
1:{"key":21,"name":"CH1 ","ip":"185.19.94.211","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":22,"name":"CH2 ","ip":"185.19.94.212","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":23,"name":"CH3 ","ip":"185.19.94.212","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":24,"name":"CH4 ","ip":"185.19.94.212","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":25,"name":"CH5 ","ip":"185.19.94.212","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":26,"name":"CH6 ","ip":"185.19.94.212","tcp_port":29000,"udp_port":29000,"state":"...",},
7:{"key":27,"name":"CH7 ","ip":"185.19.94.212","tcp_port":37000,"udp_port":37000,"state":"...",},
8:{"key":28,"name":"CH8 ","ip":"185.19.94.212","tcp_port":38000,"udp_port":38000,"state":"...",},
}
SERVER03_CHANNEL_DICT = {
1:{"key":31,"name":"CH1 ","ip":"185.19.94.211","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":32,"name":"CH2 ","ip":"185.19.94.212","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":33,"name":"CH3 ","ip":"185.19.94.212","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":34,"name":"CH4 ","ip":"185.19.94.212","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":35,"name":"CH5 ","ip":"185.19.94.212","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":36,"name":"CH6 ","ip":"185.19.94.212","tcp_port":29000,"udp_port":29000,"state":"...",},
7:{"key":37,"name":"CH7 ","ip":"185.19.94.212","tcp_port":37000,"udp_port":37000,"state":"...",},
8:{"key":38,"name":"CH8 ","ip":"185.19.94.212","tcp_port":38000,"udp_port":38000,"state":"...",},
}
# SERVER04_CHANNEL_DICT = {
# 1:{"key":41,"name":"CH1 ","ip":"185.19.94.212","tcp_port":16000,"udp_port":16000,"state":"...",},
# 2:{"key":42,"name":"CH2 ","ip":"185.19.94.212","tcp_port":18000,"udp_port":18000,"state":"...",},
# 3:{"key":43,"name":"CH3 ","ip":"185.19.94.212","tcp_port":21000,"udp_port":21000,"state":"...",},
# 4:{"key":44,"name":"CH4 ","ip":"185.19.94.212","tcp_port":23000,"udp_port":23000,"state":"...",},
# 5:{"key":45,"name":"CH5 ","ip":"185.19.94.212","tcp_port":26000,"udp_port":26000,"state":"...",},
# 6:{"key":46,"name":"CH6 ","ip":"185.19.94.212","tcp_port":29000,"udp_port":29000,"state":"...",},
# 7:{"key":47,"name":"CH7 ","ip":"185.19.94.212","tcp_port":37000,"udp_port":37000,"state":"...",},
# 8:{"key":48,"name":"CH8 ","ip":"185.19.94.212","tcp_port":38000,"udp_port":38000,"state":"...",},
# }
SERVER05_CHANNEL_DICT = {
1:{"key":51,"name":"CH1 ","ip":"185.19.94.221","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":52,"name":"CH2 ","ip":"185.19.94.222","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":53,"name":"CH3 ","ip":"185.19.94.222","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":54,"name":"CH4 ","ip":"185.19.94.222","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":55,"name":"CH5 ","ip":"185.19.94.222","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":56,"name":"CH6 ","ip":"185.19.94.222","tcp_port":29000,"udp_port":29000,"state":"...",},
}
SERVER06_CHANNEL_DICT = {
1:{"key":61,"name":"CH1 ","ip":"185.19.94.221","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":62,"name":"CH2 ","ip":"185.19.94.222","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":63,"name":"CH3 ","ip":"185.19.94.222","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":64,"name":"CH4 ","ip":"185.19.94.222","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":65,"name":"CH5 ","ip":"185.19.94.222","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":66,"name":"CH6 ","ip":"185.19.94.222","tcp_port":29000,"udp_port":29000,"state":"...",},
}
SERVER07_CHANNEL_DICT = {
1:{"key":71,"name":"CH1 ","ip":"185.19.94.221","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":72,"name":"CH2 ","ip":"185.19.94.222","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":73,"name":"CH3 ","ip":"185.19.94.222","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":74,"name":"CH4 ","ip":"185.19.94.222","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":75,"name":"CH5 ","ip":"185.19.94.222","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":76,"name":"CH6 ","ip":"185.19.94.222","tcp_port":29000,"udp_port":29000,"state":"...",},
}
# SERVER08_CHANNEL_DICT = {
# 1:{"key":81,"name":"CH1 ","ip":"185.19.94.222","tcp_port":16000,"udp_port":16000,"state":"...",},
# 2:{"key":82,"name":"CH2 ","ip":"185.19.94.222","tcp_port":18000,"udp_port":18000,"state":"...",},
# 3:{"key":83,"name":"CH3 ","ip":"185.19.94.222","tcp_port":21000,"udp_port":21000,"state":"...",},
# 4:{"key":84,"name":"CH4 ","ip":"185.19.94.222","tcp_port":23000,"udp_port":23000,"state":"...",},
# 5:{"key":85,"name":"CH5 ","ip":"185.19.94.222","tcp_port":26000,"udp_port":26000,"state":"...",},
# 6:{"key":86,"name":"CH6 ","ip":"185.19.94.222","tcp_port":29000,"udp_port":29000,"state":"...",},
# }
SERVER09_CHANNEL_DICT = {
1:{"key":91,"name":"CH1 ","ip":"185.19.94.231","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":92,"name":"CH2 ","ip":"185.19.94.232","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":93,"name":"CH3 ","ip":"185.19.94.232","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":94,"name":"CH4 ","ip":"185.19.94.232","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":95,"name":"CH5 ","ip":"185.19.94.232","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":96,"name":"CH6 ","ip":"185.19.94.232","tcp_port":29000,"udp_port":29000,"state":"...",},
}
SERVER10_CHANNEL_DICT = {
1:{"key":101,"name":"CH1 ","ip":"185.19.94.231","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":102,"name":"CH2 ","ip":"185.19.94.232","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":103,"name":"CH3 ","ip":"185.19.94.232","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":104,"name":"CH4 ","ip":"185.19.94.232","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":105,"name":"CH5 ","ip":"185.19.94.232","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":106,"name":"CH6 ","ip":"185.19.94.232","tcp_port":29000,"udp_port":29000,"state":"...",},
}
SERVER11_CHANNEL_DICT = {
1:{"key":111,"name":"CH1 ","ip":"185.19.94.231","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":112,"name":"CH2 ","ip":"185.19.94.232","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":113,"name":"CH3 ","ip":"185.19.94.232","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":114,"name":"CH4 ","ip":"185.19.94.232","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":115,"name":"CH5 ","ip":"185.19.94.232","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":116,"name":"CH6 ","ip":"185.19.94.232","tcp_port":29000,"udp_port":29000,"state":"...",},
}
# SERVER12_CHANNEL_DICT = {
# 1:{"key":121,"name":"CH1 ","ip":"185.19.94.232","tcp_port":16000,"udp_port":16000,"state":"...",},
# 2:{"key":122,"name":"CH2 ","ip":"185.19.94.232","tcp_port":18000,"udp_port":18000,"state":"...",},
# 3:{"key":123,"name":"CH3 ","ip":"185.19.94.232","tcp_port":21000,"udp_port":21000,"state":"...",},
# 4:{"key":124,"name":"CH4 ","ip":"185.19.94.232","tcp_port":23000,"udp_port":23000,"state":"...",},
# 5:{"key":125,"name":"CH5 ","ip":"185.19.94.232","tcp_port":26000,"udp_port":26000,"state":"...",},
# 6:{"key":126,"name":"CH6 ","ip":"185.19.94.232","tcp_port":29000,"udp_port":29000,"state":"...",},
# }
SERVER13_CHANNEL_DICT = {
1:{"key":131,"name":"CH1 ","ip":"185.19.94.241","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":132,"name":"CH2 ","ip":"185.19.94.242","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":133,"name":"CH3 ","ip":"185.19.94.242","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":134,"name":"CH4 ","ip":"185.19.94.242","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":135,"name":"CH5 ","ip":"185.19.94.242","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":136,"name":"CH6 ","ip":"185.19.94.242","tcp_port":29000,"udp_port":29000,"state":"...",},
}
SERVER14_CHANNEL_DICT = {
1:{"key":141,"name":"CH1 ","ip":"185.19.94.241","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":142,"name":"CH2 ","ip":"185.19.94.242","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":143,"name":"CH3 ","ip":"185.19.94.242","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":144,"name":"CH4 ","ip":"185.19.94.242","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":145,"name":"CH5 ","ip":"185.19.94.242","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":146,"name":"CH6 ","ip":"185.19.94.242","tcp_port":29000,"udp_port":29000,"state":"...",},
}
SERVER15_CHANNEL_DICT = {
1:{"key":151,"name":"CH1 ","ip":"185.19.94.241","tcp_port":16000,"udp_port":16000,"state":"...",},
2:{"key":152,"name":"CH2 ","ip":"185.19.94.242","tcp_port":18000,"udp_port":18000,"state":"...",},
3:{"key":153,"name":"CH3 ","ip":"185.19.94.242","tcp_port":21000,"udp_port":21000,"state":"...",},
4:{"key":154,"name":"CH4 ","ip":"185.19.94.242","tcp_port":23000,"udp_port":23000,"state":"...",},
5:{"key":155,"name":"CH5 ","ip":"185.19.94.242","tcp_port":26000,"udp_port":26000,"state":"...",},
6:{"key":156,"name":"CH6 ","ip":"185.19.94.242","tcp_port":29000,"udp_port":29000,"state":"...",},
}
# SERVER16_CHANNEL_DICT = {
# 1:{"key":161,"name":"CH1 ","ip":"185.19.94.242","tcp_port":16000,"udp_port":16000,"state":"...",},
# 2:{"key":162,"name":"CH2 ","ip":"185.19.94.242","tcp_port":18000,"udp_port":18000,"state":"...",},
# 3:{"key":163,"name":"CH3 ","ip":"185.19.94.242","tcp_port":21000,"udp_port":21000,"state":"...",},
# 4:{"key":164,"name":"CH4 ","ip":"185.19.94.242","tcp_port":23000,"udp_port":23000,"state":"...",},
# 5:{"key":165,"name":"CH5 ","ip":"185.19.94.242","tcp_port":26000,"udp_port":26000,"state":"...",},
# 6:{"key":166,"name":"CH6 ","ip":"185.19.94.242","tcp_port":29000,"udp_port":29000,"state":"...",},
# }
REGION_NAME_DICT = {
0 : "Turkey",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":"185.19.94.211", "port":11777, },
2 : { "ip":"185.19.94.212", "port":11877, },
3 : { "ip":"185.19.94.212", "port":11977, },
# 4 : { "ip":"185.19.94.212", "port":11877, },
5 : { "ip":"185.19.94.221", "port":11777, },
6 : { "ip":"185.19.94.222", "port":11877, },
7 : { "ip":"185.19.94.222", "port":11977, },
# 8 : { "ip":"185.19.94.222", "port":11877, },
9 : { "ip":"185.19.94.231", "port":11777, },
10 : { "ip":"185.19.94.232", "port":11877, },
11 : { "ip":"185.19.94.232", "port":11977, },
# 12 : { "ip":"185.19.94.232", "port":11877, },
13 : { "ip":"185.19.94.241", "port":11777, },
14 : { "ip":"185.19.94.242", "port":11877, },
15 : { "ip":"185.19.94.242", "port":11977, },
# 16 : { "ip":"185.19.94.242", "port":11877, }
}
}
REGION_DICT = {
0 : {
1 : { "name" : "Saltanat", "channel" : SERVER01_CHANNEL_DICT, },
2 : { "name" : "Saltanat", "channel" : SERVER02_CHANNEL_DICT, },
3 : { "name" : "Saltanat", "channel" : SERVER03_CHANNEL_DICT, },
# 4 : { "name" : "Saltanat", "channel" : SERVER04_CHANNEL_DICT, },
5 : { "name" : "Boldest", "channel" : SERVER05_CHANNEL_DICT, },
6 : { "name" : "Boldest", "channel" : SERVER06_CHANNEL_DICT, },
7 : { "name" : "Boldest", "channel" : SERVER07_CHANNEL_DICT, },
# 8 : { "name" : "Boldest", "channel" : SERVER08_CHANNEL_DICT, },
9 : { "name" : "Kingdom OF HeaveN", "channel" : SERVER09_CHANNEL_DICT, },
10 : { "name" : "Kingdom OF HeaveN", "channel" : SERVER10_CHANNEL_DICT, },
11 : { "name" : "Kingdom OF HeaveN", "channel" : SERVER11_CHANNEL_DICT, },
# 12 : { "name" : "Kingdom OF HeaveN", "channel" : SERVER12_CHANNEL_DICT, },
13 : { "name" : "M2-Cape", "channel" : SERVER13_CHANNEL_DICT, },
14 : { "name" : "M2-Cape", "channel" : SERVER14_CHANNEL_DICT, },
15 : { "name" : "M2-Cape", "channel" : SERVER15_CHANNEL_DICT, },
# 16 : { "name" : "M2-Cape", "channel" : SERVER16_CHANNEL_DICT, },
},
}
MARKADDR_DICT = {
10 : { "ip" : "185.19.94.211", "tcp_port" : 16000, "mark" : "10.tga", "symbol_path" : "10", },
20 : { "ip" : "185.19.94.211", "tcp_port" : 16000, "mark" : "20.tga", "symbol_path" : "20", },
30 : { "ip" : "185.19.94.211", "tcp_port" : 16000, "mark" : "30.tga", "symbol_path" : "30", },
# 40 : { "ip" : "185.19.94.212", "tcp_port" : 16000, "mark" : "40.tga", "symbol_path" : "40", },
50 : { "ip" : "185.19.94.221", "tcp_port" : 16000, "mark" : "50.tga", "symbol_path" : "50", },
60 : { "ip" : "185.19.94.221", "tcp_port" : 16000, "mark" : "60.tga", "symbol_path" : "60", },
70 : { "ip" : "185.19.94.221", "tcp_port" : 16000, "mark" : "70.tga", "symbol_path" : "70", },
# 80 : { "ip" : "185.19.94.222", "tcp_port" : 16000, "mark" : "80.tga", "symbol_path" : "80", },
90 : { "ip" : "185.19.94.231", "tcp_port" : 16000, "mark" : "90.tga", "symbol_path" : "90", },
100 : { "ip" : "185.19.94.231", "tcp_port" : 16000, "mark" : "100.tga", "symbol_path" : "100", },
110 : { "ip" : "185.19.94.231", "tcp_port" : 16000, "mark" : "110.tga", "symbol_path" : "110", },
# 120 : { "ip" : "185.19.94.232", "tcp_port" : 16000, "mark" : "120.tga", "symbol_path" : "120", },
130 : { "ip" : "185.19.94.241", "tcp_port" : 16000, "mark" : "130.tga", "symbol_path" : "130", },
140 : { "ip" : "185.19.94.241", "tcp_port" : 16000, "mark" : "140.tga", "symbol_path" : "140", },
150 : { "ip" : "185.19.94.241", "tcp_port" : 16000, "mark" : "150.tga", "symbol_path" : "150", },
# 160 : { "ip" : "185.19.94.242", "tcp_port" : 16000, "mark" : "160.tga", "symbol_path" : "160", },
}
TESTADDR = { "ip" : "210.123.10.153", "tcp_port" : 50000, "udp_port" : 50000, }