This commit is contained in:
Евгений Храмов 2023-05-13 18:14:22 +03:00
parent 89a8c30174
commit 5b31053a72

14
hlna.py

@ -513,7 +513,7 @@ def start_stop(action, g, m, b):
if v in m:
names_serverstart.append(ns)
print_line(f"Карта которая запускается {ns}")
if list_config != []:
if list_config != []: #Перенести выше для проверки наличия конфигов
if b == '':
if m == "all":
names_serverstart = dict_allmapname
@ -569,15 +569,17 @@ def rcon(m, c):
print_line(f"Карты: , {m}")
dict_mapname = {}
dict_adminpwd = {}
if list_config:
rcon_ports = []
for i in list_config:
data = read_yaml(i)
dict_mapname[data['RCONPort']] = data['map']
dict_adminpwd[data['RCONPort']] = data['ServerAdminPassword']
rcon_ports = []
print("dictmapname", dict_mapname)
if m == all:
for rcon_p in dict_mapname:
print(rcon_p)
else:
for rcon_p, name_map in dict_mapname.items():
print("name_map=", name_map)
print("name_map=", name_map)
print_line(f"переменные name_map и m {name_map} & {m}") # обьединить с таким же блоком в start()
if name_map in m:
rcon_ports.append(rcon_p)
@ -587,6 +589,8 @@ def rcon(m, c):
with Client('127.0.0.1', port, passwd=str(passwd)) as client:
response = client.run(c)
print(response)
else:
pass
def zero(x=""):