#irc #parser

ircmsgprs

A simple library for parsing IRC protocol messages

4 releases

0.2.1 Feb 13, 2020
0.2.0 Feb 8, 2020
0.1.1 Feb 7, 2020
0.1.0 Feb 7, 2020

#331 in Parser implementations

Download history 4/week @ 2020-05-23 9/week @ 2020-05-30 4/week @ 2020-06-06 1/week @ 2020-06-13 4/week @ 2020-06-27 4/week @ 2020-07-04 8/week @ 2020-07-11 4/week @ 2020-07-18 1/week @ 2020-07-25 8/week @ 2020-08-08 5/week @ 2020-08-22 8/week @ 2020-08-29 13/week @ 2020-09-05

141 downloads per month

MIT license

9KB
189 lines

ircmsgprs

A simple Rust library that parses IRC protocol messages and turns them into the following struct:

#[derive(Default, Debug)]
pub struct Message {
    pub server: Option<String>,
    pub nick: Option<String>,
    pub user: Option<String>,
    pub host: Option<String>,
    pub command: String,
    pub params: Vec<String>,
}

Usage

let mut parser = parser::Parser::new();
let result = parser
    .parse(":nick!user@host COMMAND param1 param2 :trailing param with spaces")
    .unwrap();
println!("{}", result);

License

Licensed under the MIT license. See the license file for details.

No runtime deps