extensions

This commit is contained in:
MeexReay 2025-02-09 17:59:40 +03:00
parent 31847a165c
commit 8c3517a8ac
2 changed files with 29 additions and 1 deletions

View File

@ -20,6 +20,34 @@ cargo build # build
cargo run # run cargo run # run
``` ```
## extensions
### colored usernames
#### bRAC
regex - `\[(.*?)\] \uB9AC\u3E70<(.*?)> (.*)` \
color - green \
example - `[date] 리㹰<nick> text`
#### CRAB
regex - `\[(.*?)\] \u2550\u2550\u2550<(.*?)> (.*)` \
color - light red \
example - `[date] ═══<nick> text`
#### Mefedroniy
regex - `\[(.*?)\] (.*?): (.*)` \
color - light magenta \
example - `[date] nick: text`
#### clRAC
regex - `\[(.*?)\] <(.*?)> (.*)` \
color - cyan \
example - `[date] <nick> text`
## see also ## see also
- [CRAB - client & server for RAC](https://gitea.bedohswe.eu.org/pixtaded/crab) - [CRAB - client & server for RAC](https://gitea.bedohswe.eu.org/pixtaded/crab)

View File

@ -9,7 +9,7 @@ use termion::{event::Key, input::TermRead, raw::IntoRawMode};
const MAX_MESSAGES: usize = 100; const MAX_MESSAGES: usize = 100;
const DEFAULT_HOST: &str = "meex.lol:11234"; const DEFAULT_HOST: &str = "meex.lol:11234";
const MAGIC_KEY: &str = "리㹰"; const MAGIC_KEY: &str = "\u{B9AC}\u{3E70}";
fn send_message(host: &str, message: &str) -> Result<(), Box<dyn Error>> { fn send_message(host: &str, message: &str) -> Result<(), Box<dyn Error>> {
let mut stream = TcpStream::connect(host)?; let mut stream = TcpStream::connect(host)?;