Crate circe[−][src]
Expand description
A simple IRC crate written in rust
use circe::{commands::Command, Client, Config};
fn main() -> Result<(), std::io::Error> {
let config = Default::default();
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(nick, channel, message) = command {
println!("PRIVMSG received from {}: {} {}", nick, channel, message);
}
}
}
}
Modules
IRC comamnds