fix player leave/join ignored if no access level
All checks were successful
Build and Push Docker Image / build (push) Successful in 14s
All checks were successful
Build and Push Docker Image / build (push) Successful in 14s
caused by bad regex pattern
This commit is contained in:
parent
cffe8546c1
commit
09cfb2ac58
@ -149,7 +149,7 @@ class ConsoleCog(commands.Cog):
|
|||||||
Example of line:
|
Example of line:
|
||||||
ConnectionManager: [fully-connected] "" connection: guid=*** ip=*** steam-id=*** access=admin username="corbz" connection-type="UDPRakNet"
|
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)
|
re_match = re.search(re_pattern, line)
|
||||||
if not re_match:
|
if not re_match:
|
||||||
log.warning("failed to parse player data: %s", line)
|
log.warning("failed to parse player data: %s", line)
|
||||||
@ -183,7 +183,7 @@ class ConsoleCog(commands.Cog):
|
|||||||
Example of line:
|
Example of line:
|
||||||
ConnectionManager: [disconnect] "receive-disconnect" connection: guid=*** ip=*** steam-id=*** access=admin username="corbz" connection-type="Disconnected"
|
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)
|
re_match = re.search(re_pattern, line)
|
||||||
if not re_match:
|
if not re_match:
|
||||||
log.warning("failed to parse player data: %s", line)
|
log.warning("failed to parse player data: %s", line)
|
||||||
|
Reference in New Issue
Block a user