Crate circe[][src]

Expand description

A simple IRC crate written in rust

use circe::*;
fn main() -> Result<(), std::io::Error> {
    let config = Config::from_toml("config.toml")?;
    let mut client = Client::new(config)?;
    client.identify()?;

    loop {
        if let Ok(ref command) = client.read() {
            if let Command::OTHER(line) = command {
                print!("{}", line);
            }
            if let Command::PRIVMSG(channel, message) = command {
               println!("PRIVMSG received: {} {}", channel, message);
            }
        }
    }

}

Structs

An IRC client

Config for the IRC client

Enums

IRC commands Not reccomended to use, use the helper functions instead