diff --git a/main.go b/main.go index f802b2d..869310c 100644 --- a/main.go +++ b/main.go @@ -72,21 +72,20 @@ type MatrixConfig struct { var ( chatRE = regexp.MustCompile( - `^\[[0-9:]+\] \[[^]]+/INFO\]: (?:\[Not Secure\] )?<([^>]+)> (.*)$`, + `^\[[0-9:]+\] \[[^]]+/INFO\]: (?:System chat: )?(?:\[Not Secure\] )?<([^>]+)> (.*)$`, ) joinRE = regexp.MustCompile( - `^\[[0-9:]+\] \[[^]]+/INFO\]: ([A-Za-z0-9_]+) joined the game$`, + `^\[[0-9:]+\] \[[^]]+/INFO\]: (?:System chat: )?([A-Za-z0-9_]+) joined the game$`, ) leaveRE = regexp.MustCompile( - `^\[[0-9:]+\] \[[^]]+/INFO\]: ([A-Za-z0-9_]+) left the game$`, + `^\[[0-9:]+\] \[[^]]+/INFO\]: (?:System chat: )?([A-Za-z0-9_]+) left the game$`, ) advancementRE = regexp.MustCompile( - `^\[[0-9:]+\] \[[^]]+/INFO\]: ([A-Za-z0-9_]+) has (?:made the advancement|reached the goal|completed the challenge) \[(.+)\]$`, - ) - + `^\[[0-9:]+\] \[[^]]+/INFO\]: (?:System chat: )?([A-Za-z0-9_]+) has (?:made the advancement|reached the goal|completed the challenge) \[(.+)\]$`, + ) deathRE = regexp.MustCompile( `^\[[0-9:]+\] \[[^]]+/INFO\]: (.+)$`, )