diff options
Diffstat (limited to 'azalea-client/src/plugins/chat')
| -rw-r--r-- | azalea-client/src/plugins/chat/mod.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/azalea-client/src/plugins/chat/mod.rs b/azalea-client/src/plugins/chat/mod.rs index 11ad742c..ca247ec4 100644 --- a/azalea-client/src/plugins/chat/mod.rs +++ b/azalea-client/src/plugins/chat/mod.rs @@ -100,6 +100,12 @@ impl ChatPacket { { return (Some(m[1].to_string()), m[2].to_string()); } + // hypixel whispers + if let Some(m) = + regex!(r"^From (?:\[[^\]]+\] )(\w{1,16}): (.+)$").captures(&message) + { + return (Some(m[1].to_string()), m[2].to_string()); + } (None, message) } @@ -171,7 +177,11 @@ impl ChatPacket { if p.overlay { return false; } - if regex!("^(-> me|[a-zA-Z_0-9]{1,16} whispers: )").is_match(&message) { + if regex!(r"^(-> me|\w{1,16} whispers: )").is_match(&message) { + return true; + } + // hypixel + if regex!(r"^From (?:\[[^\]]+\] )?\w{1,16}: ").is_match(&message) { return true; } |
