diff --git a/wrapper.py b/wrapper.py index 702ebac..d91bfb1 100644 --- a/wrapper.py +++ b/wrapper.py @@ -55,12 +55,16 @@ def send_process_output( logout_result = logout_pattern.search(line) if chat_result: msg_queue.add( - {"user": result.group(4), "action": "chat", "msg": result.group(5).rstrip("\n")}, + { + "user": chat_result.group(4), + "action": "chat", + "msg": chat_result.group(5).rstrip("\n"), + }, ) elif login_result: - msg_queue.add({"user": result.group(3), "action": "joined"}) + msg_queue.add({"user": login_result.group(3), "action": "joined"}) elif logout_result: - msg_queue.add({"user": result.group(3), "action": "left"}) + msg_queue.add({"user": logout_result.group(3), "action": "left"}) def relay_queue_input(