circe/src/main.rs

27 lines
583 B
Rust

use irsc::{Client, Config};
#[allow(unused_macros)]
macro_rules! loop_n {
($n:expr, $c:expr) => {{
for _ in 0..$n {
$c
}
}};
}
fn main() -> Result<(), std::io::Error> {
let config = Config::new("test", Some("test"), Some("+B"));
let mut client =
Client::new("192.168.1.28", 6667, config).expect("Unable to connect to IRC server");
loop {
client.try_identify()?;
// client.has_identified = true;
if let Some(line) = client.read_string() {
print!("{}", line);
}
}
Ok(())
}