A fork of aatxe/irc Rust crate, improved for IRCv3 support.
Find a file
Aaron Weiss 202748e7a9 Merge pull request #11 from SBSTP/tomessage
[API Improvement] Implement ToMessage for Command and Message and use ToMessage in Connection
2014-12-31 19:08:51 -05:00
examples Updated examples with removal of deprecated code. 2014-12-23 13:00:07 -05:00
src Implement ToMessage for Command and Message and use ToMessage in Connection. 2014-12-31 18:39:00 -05:00
.gitignore Added some basic data tests. 2014-10-08 18:08:29 -04:00
.travis.yml Updated travis build file and added doc notes about CTCP requiring CTCP 2014-12-23 13:32:35 -05:00
Cargo.toml Version number bump to 0.7.0. 2014-12-23 13:34:12 -05:00
mktestconfig.sh Added support for non-unicode encodings. 2014-11-30 01:29:38 -05:00
README.md Updated README.md. 2014-12-23 13:33:57 -05:00
UNLICENSE Added UNLICENSE and contributing guidelines. This library is now public domain. 2014-11-05 02:11:33 -05:00

irc Build Status

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 all features enabled. Specifically, the signatures of irc::conn::Connection::send(...) and irc::conn::Connection::recv(...) will be different by default, and no CTCP functions will be present.

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.