Skip to content

zonyitoo/irc-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRC-rs

Build Status License

IRC library for Rust

Usage

Serialization and Deserialization

extern crate irc;

use irc::protocol::{Message, Body, IrcMessage};
use irc::protocol::command::PrivmsgCommand;

fn main() {

    let data = ":abc!abc@example.com PRIVMSG #rust :Ok, thanks guys. :)";
    let parsed_msg = Message::from_str(data).unwrap();


    let privmsg = PrivmsgCommand::new("#rust", "Ok, thanks guys. :)");
    let expected_msg = Message::new(Some("abc!abc@example.com"), Body::command(privmsg));

    assert_eq!(expected_msg, parsed_msg);

    println!("{}", expected_msg);
}

TODOs

  • Basically support RFC2812
  • API with validation
  • Supports for clients and servers
  • Sample clients and server implementation

About

IRC library for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages