diff options
| author | mat <git@matdoes.dev> | 2026-03-19 04:12:20 -0100 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-03-19 04:12:20 -0100 |
| commit | b03d2942e1bef98e13acadde5cbb8856a3f8c74d (patch) | |
| tree | f1be3cd3151c3194677001d520aedf2ad18f92b8 /azalea-client/src/plugins/chat/mod.rs | |
| parent | 176907fa8bc2c03f245b837f09a80d073856d4dd (diff) | |
| download | azalea-drasl-b03d2942e1bef98e13acadde5cbb8856a3f8c74d.tar.xz | |
implement speed effect
Diffstat (limited to 'azalea-client/src/plugins/chat/mod.rs')
| -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; } |
