2015-02-14 16:47:49 -05:00
|
|
|
# irc [](https://travis-ci.org/aatxe/irc) [](https://crates.io/crates/irc) #
|
2015-01-13 02:57:40 -05:00
|
|
|
A thread-safe IRC library in Rust. The client portion is compliant with
|
|
|
|
[RFC 2812](http://tools.ietf.org/html/rfc2812) and includes some additional, common features. The
|
|
|
|
server portion is still a work in progress. You can find up-to-date, ready-to-use documentation
|
2015-01-13 03:37:58 -05:00
|
|
|
online [here](http://aatxe.github.io/irc/irc/). The documentation is generated with the
|
2015-01-13 02:57:40 -05:00
|
|
|
default features. These are, however, strictly optional and can be disabled accordingly.
|
2014-12-02 12:26:50 -05:00
|
|
|
|
|
|
|
## Getting Started ##
|
|
|
|
|
|
|
|
To start using this library with cargo, you can simply add `irc = "*"` to your dependencies to your
|
2015-01-13 02:57:40 -05:00
|
|
|
Cargo.toml file. You'll likely want to take a look at some of the examples, as well as the
|
|
|
|
documentation. You'll also be able to find a small template to get a feel for the library.
|
|
|
|
|
|
|
|
## Getting Started with Bots ##
|
2014-12-02 12:26:50 -05:00
|
|
|
|
|
|
|
```rust
|
2014-12-05 10:27:58 -05:00
|
|
|
extern crate irc;
|
|
|
|
|
2015-02-22 21:22:33 -05:00
|
|
|
use irc::client::prelude::*;
|
2014-12-05 10:27:58 -05:00
|
|
|
|
2014-12-02 12:26:50 -05:00
|
|
|
fn main() {
|
2015-02-24 10:14:44 -05:00
|
|
|
let server = IrcServer::new("config.json").unwrap();
|
2014-12-02 12:26:50 -05:00
|
|
|
server.identify().unwrap();
|
|
|
|
for message in server.iter() {
|
2014-12-05 10:27:58 -05:00
|
|
|
// Do message processing.
|
2014-12-02 12:26:50 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2014-11-05 02:11:33 -05:00
|
|
|
|
|
|
|
## Contributing ##
|
2015-02-19 22:44:33 -05:00
|
|
|
Contributions to this library would be immensely appreciated. It should be noted that as this is a
|
|
|
|
public domain project, any contributions will thus be released into the public domain as well.
|