Async version of circe using tokio
Go to file
famfo 41fd72cb93 Uhm, stuff 2022-01-14 14:17:33 +01:00
examples Removed logging 2022-01-06 23:51:02 +01:00
src Uhm, stuff 2022-01-14 14:17:33 +01:00
.gitignore Inlined 'Cargo.lock' in '.gitignore' 2021-12-06 11:05:35 -06:00
Cargo.toml Fixed documentation 2022-01-05 11:53:57 +01:00
LICENSE Prepare crate for publishing 2021-11-04 12:29:01 -05:00
README.md Experimental topic implementation 2022-01-10 17:33:35 +01:00

README.md

Circe

crates.io Documentation Unlicense

async-circe is a an IRC crate built to be as minimal as possible. It's currently work-in-progress, and more stuff is on its way!

Getting started

To start using Circe, just add the crate to your Cargo.toml, and then follow the example below.

use async_circe::{commands::Command, Client, Config};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), tokio::io::Error> {
    let config = Config::new(
            &["#chaos", "#async-circe"],
            "karx.xyz",
            Some("+B"),
            Some("async-circe"),
            6697,
            "circe",
            );
    let mut client = Client::new(config).await.unwrap();
    client.identify().await.unwrap();

    loop {
        if let Some(command) = client.read().await? {
            if let Command::PRIVMSG(nick, channel, message) = command {
                println!("{} in {}: {}", nick, channel, message);
            }
        }
    }
}

Happy hacking!

todo list for famfo:

  • : implement getting the topic of a channel
  • : implement getting users in a channel