diff --git a/cogs/console.py b/cogs/console.py index a20cb7e..2267e08 100644 --- a/cogs/console.py +++ b/cogs/console.py @@ -149,7 +149,7 @@ class ConsoleCog(commands.Cog): Example of line: ConnectionManager: [fully-connected] "" connection: guid=*** ip=*** steam-id=*** access=admin username="corbz" connection-type="UDPRakNet" """ - re_pattern = r"guid=(\d+) ip=([\d\.]+) steam-id=(\d+) access=(\w+) username=\"([^\"]+)\" connection-type=\"([^\"]+)\"" + re_pattern = r"guid=(\d+)\s+ip=([\d\.]+)\s+steam-id=(\d+)\s+access=(\w*)\s+username=\"([^\"]+)\"\s+connection-type=\"([^\"]+)\"" re_match = re.search(re_pattern, line) if not re_match: log.warning("failed to parse player data: %s", line) @@ -183,7 +183,7 @@ class ConsoleCog(commands.Cog): Example of line: ConnectionManager: [disconnect] "receive-disconnect" connection: guid=*** ip=*** steam-id=*** access=admin username="corbz" connection-type="Disconnected" """ - re_pattern = r"guid=(\d+) ip=([\d\.]+) steam-id=(\d+) access=(\w+) username=\"([^\"]+)\" connection-type=\"([^\"]+)\"" + re_pattern = r"guid=(\d+)\s+ip=([\d\.]+)\s+steam-id=(\d+)\s+access=(\w*)\s+username=\"([^\"]+)\"\s+connection-type=\"([^\"]+)\"" re_match = re.search(re_pattern, line) if not re_match: log.warning("failed to parse player data: %s", line)