moved to SYS machine
This commit is contained in:
parent
4eaa830de1
commit
119463756e
@ -105,7 +105,7 @@ def kill_css_process():
|
|||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
print('preparing to launch game....')
|
print('preparing to launch game....')
|
||||||
os.chdir(f"""/home/{who_am_i}/.steam/debian-installation/""")
|
os.chdir(f"""/home/{who_am_i}/.steam/debian-installation/""")
|
||||||
subprocess.check_call("./steam.sh %s" % ("-applaunch 240 -textmode -textmessagedebug -novid -nosound -noipx -nojoy -noshaderapi -port 29072"), shell=True)
|
subprocess.check_call("./steam.sh %s" % ("-applaunch 240 -textmode -textmessagedebug -novid -nosound -noipx -nojoy -noshaderapi -port 29073"), shell=True)
|
||||||
print('finished starting game')
|
print('finished starting game')
|
||||||
|
|
||||||
def bot_connect_ze():
|
def bot_connect_ze():
|
||||||
@ -128,8 +128,9 @@ def pairwise(it):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
atexit.register(exit_handler)
|
atexit.register(exit_handler)
|
||||||
local_ip = "127.0.0.1"
|
hetzner_ip = "144.76.218.19"
|
||||||
local_port = 48477
|
local_ip = "127.0.0.1"
|
||||||
|
local_port = 48479
|
||||||
udp_external_ip = "164.132.201.173"
|
udp_external_ip = "164.132.201.173"
|
||||||
buffer_size = 4096 #potentially not large enough?
|
buffer_size = 4096 #potentially not large enough?
|
||||||
connection_issue_counter = 0;
|
connection_issue_counter = 0;
|
||||||
@ -149,9 +150,7 @@ if __name__ == '__main__':
|
|||||||
#print(data)
|
#print(data)
|
||||||
if not data:
|
if not data:
|
||||||
continue
|
continue
|
||||||
if ip not in [local_ip, udp_external_ip]:
|
if ip == udp_external_ip or ip == local_ip:
|
||||||
continue
|
|
||||||
if ip == udp_external_ip:
|
|
||||||
if messager_name in data:
|
if messager_name in data:
|
||||||
messager_name = ""
|
messager_name = ""
|
||||||
response_msg = f"""say {messager_name} {data}"""
|
response_msg = f"""say {messager_name} {data}"""
|
||||||
@ -160,6 +159,8 @@ if __name__ == '__main__':
|
|||||||
#needs mini delay to have time to write input to console
|
#needs mini delay to have time to write input to console
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
writeCfgInput("")
|
writeCfgInput("")
|
||||||
|
if ip != hetzner_ip:
|
||||||
|
continue
|
||||||
if data == "autismo connected":
|
if data == "autismo connected":
|
||||||
print('Bot connected!')
|
print('Bot connected!')
|
||||||
connection_issue_counter = 0
|
connection_issue_counter = 0
|
||||||
|
@ -215,14 +215,18 @@ public void OnMapStart()
|
|||||||
|
|
||||||
public void send_socket_msg(char[] query_msg, int len)
|
public void send_socket_msg(char[] query_msg, int len)
|
||||||
{
|
{
|
||||||
|
char server_ip[generic_length];
|
||||||
|
Format(server_ip, sizeof(server_ip), "164.132.201.173");
|
||||||
if (global_socket != INVALID_HANDLE && SocketIsConnected(global_socket))
|
if (global_socket != INVALID_HANDLE && SocketIsConnected(global_socket))
|
||||||
SocketSendTo(global_socket, query_msg, len, "127.0.0.1", 48477); //udp
|
SocketSendTo(global_socket, query_msg, len, server_ip, 48479); //udp
|
||||||
}
|
}
|
||||||
|
|
||||||
public void send_socket_msg1(char[] query_msg, int len)
|
public void send_socket_msg1(char[] query_msg, int len)
|
||||||
{
|
{
|
||||||
|
char server_ip[generic_length];
|
||||||
|
Format(server_ip, sizeof(server_ip), "164.132.201.173");
|
||||||
if (global_socket != INVALID_HANDLE && SocketIsConnected(global_socket))
|
if (global_socket != INVALID_HANDLE && SocketIsConnected(global_socket))
|
||||||
SocketSendTo(global_socket, query_msg, len, "127.0.0.1", 48478); //udp
|
SocketSendTo(global_socket, query_msg, len, server_ip, 48480); //udp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user