commit
65cdfd1f80
2 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "irc"
|
||||
version = "0.13.0"
|
||||
version = "0.13.1"
|
||||
description = "A simple, thread-safe, and async-friendly library for IRC clients."
|
||||
authors = ["Aaron Weiss <awe@pdgn.co>"]
|
||||
license = "MPL-2.0"
|
||||
|
|
14
README.md
14
README.md
|
@ -34,13 +34,13 @@ use irc::client::prelude::*;
|
|||
fn main() {
|
||||
let cfg = Config {
|
||||
nickname: Some(format!("irc-rs")),
|
||||
server: Some(format!("irc.example.com")),
|
||||
client: Some(format!("irc.example.com")),
|
||||
channels: Some(vec![format!("#test")]),
|
||||
.. Default::default()
|
||||
};
|
||||
let server = IrcServer::from_config(cfg).unwrap();
|
||||
server.identify().unwrap();
|
||||
server.for_each_incoming(|message| {
|
||||
let client = IrcClient::from_config(cfg).unwrap();
|
||||
client.identify().unwrap();
|
||||
client.for_each_incoming(|message| {
|
||||
// Do message processing.
|
||||
}).unwrap()
|
||||
}
|
||||
|
@ -61,9 +61,9 @@ extern crate irc;
|
|||
use irc::client::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let server = IrcServer::new("config.toml").unwrap();
|
||||
server.identify().unwrap();
|
||||
server.for_each_incoming(|message| {
|
||||
let client = IrcClient::new("config.toml").unwrap();
|
||||
client.identify().unwrap();
|
||||
client.for_each_incoming(|message| {
|
||||
// Do message processing.
|
||||
}).unwrap()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue