TyOverby / irc-message

An IRC message parser for Rust.
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

irc-message

Build Status

irc-message is an IRC message parsing library for rust.

Example

extern crate irc_message;

use irc_message::IrcMessage;

fn main() {
    let m = "@best=super;single :test!me@test.ing FOO bar baz quux :This is a test";
    let parsed = IrcMessage::parse_slice(m);
    println!("{}", parsed);
}

Result

Ok(
  IrcMessage {
    tags: {
      best: Some(super),
      single: None
    },
    prefix: Some(test!me@test.ing),
    command: Some(FOO),
    params: [bar, baz, quux, This is a test]
  }
)