A fork of aatxe/irc Rust crate, improved for IRCv3 support.
32900f8d49
This feature will disable user tracking including joins, parts, and modes. This is useful for bots on severely crowded channels (tens of thousands of users) that have no need for maintaining a list of users. |
||
---|---|---|
examples | ||
src | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
mktestconfig.sh | ||
README.md | ||
UNLICENSE |
irc
A thread-safe IRC library in Rust based on iterators. It's hopefully compliant with RFC 2812. You can find up-to-date, ready-to-use documentation online here. The documentation is generated with the default features. These are, however, strictly optional and can be disabled by the end-user.
Getting Started
To start using this library with cargo, you can simply add irc = "*"
to your dependencies to your
Cargo.toml file. From there, you can look to the examples and the documentation to see how to
proceed. Making a simple bot is easy though:
extern crate irc;
use irc::server::{IrcServer, Server};
use irc::server::utils::Wrapper;
fn main() {
let irc_server = IrcServer::new("config.json").unwrap();
let server = Wrapper::new(&irc_server);
server.identify().unwrap();
for message in server.iter() {
// Do message processing.
}
}
Contributing
Contributions to this library would be immensely appreciated. As this project is public domain, all prospective contributors must sign the Contributor License Agreement, a public domain dedication.