add more minecraft message regex captures

This commit is contained in:
Ryan Cavicchioni 2020-05-23 16:36:58 -05:00
parent ca2eeaf2e7
commit 94cbb6d917
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,8 @@ PATTERNS = (
(re.compile(r"(\S+) (joined|left) the game"), "{0} {1} the game"), (re.compile(r"(\S+) (joined|left) the game"), "{0} {1} the game"),
(re.compile(r"\[(\S+): Gave (\d+) \[(.+)\] to (\S+)\]"), "{0} gave {1} \"{2}\" to {3}"), (re.compile(r"\[(\S+): Gave (\d+) \[(.+)\] to (\S+)\]"), "{0} gave {1} \"{2}\" to {3}"),
(re.compile(r"(\S+) was (\S+) by (\S+)"), ":skull: {0} was {1} by {2}"), (re.compile(r"(\S+) was (\S+) by (\S+)"), ":skull: {0} was {1} by {2}"),
(re.compile(r"(\S+) tried to swim in lava"), "{0} tried to swim in lava"), (re.compile(r"(\S+) tried to swim in lava"), ":skull: {0} tried to swim in lava"),
(re.compile(r"(\S+) fell from a high place"), ":skull: {0} fell from a high place"),
) )

View File

@ -12,9 +12,12 @@ from urlparse import urljoin
PATTERN = re.compile(r"(\S+) (joined|left) the game") PATTERN = re.compile(r"(\S+) (joined|left) the game")
PATTERNS = ( PATTERNS = (
(re.compile(r": (\S+)\[.+logged in"), "{0} joined the game"),
(re.compile(r"(\S+) (joined|left) the game"), "{0} {1} the game"), (re.compile(r"(\S+) (joined|left) the game"), "{0} {1} the game"),
(re.compile(r"\[(\S+): Gave (\d+) \[(.+)\] to (\S+)\]"), "{0} gave {1} \"{2}\" to {3}"), (re.compile(r"\[(\S+): Gave (\d+) \[(.+)\] to (\S+)\]"), "{0} gave {1} \"{2}\" to {3}"),
(re.compile(r"(\S+) was (\S+) by (\S+)"), ":skull: {0} was {1} by {2}"), (re.compile(r"(\S+) was (\S+) by (\S+)"), ":skull: {0} was {1} by {2}"),
(re.compile(r"(\S+) tried to swim in lava"), ":skull: {0} tried to swim in lava"),
(re.compile(r"(\S+) fell from a high place"), ":skull: {0} fell from a high place"),
) )