Switched all the examples to use #rust-spam on irc.mozilla.org.
This commit is contained in:
parent
3aba7250b0
commit
b5b035faa7
7 changed files with 20 additions and 20 deletions
|
@ -7,15 +7,15 @@ use irc::client::prelude::*;
|
||||||
fn main() {
|
fn main() {
|
||||||
let cfg1 = Config {
|
let cfg1 = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let cfg2 = Config {
|
let cfg2 = Config {
|
||||||
nickname: Some("bananas".to_owned()),
|
nickname: Some("bananas".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ fn main() {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
alt_nicks: Some(vec!["bananas".to_owned(), "apples".to_owned()]),
|
alt_nicks: Some(vec!["bananas".to_owned(), "apples".to_owned()]),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,15 +7,15 @@ use irc::client::prelude::*;
|
||||||
fn main() {
|
fn main() {
|
||||||
let cfg1 = Config {
|
let cfg1 = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let cfg2 = Config {
|
let cfg2 = Config {
|
||||||
nickname: Some("bananas".to_owned()),
|
nickname: Some("bananas".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ fn main() {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
alt_nicks: Some(vec!["bananas".to_owned(), "apples".to_owned()]),
|
alt_nicks: Some(vec!["bananas".to_owned(), "apples".to_owned()]),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ use irc::client::prelude::*;
|
||||||
fn main() {
|
fn main() {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
use_ssl: Some(true),
|
use_ssl: Some(true),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,8 +10,8 @@ use irc::error::IrcError;
|
||||||
fn main() {
|
fn main() {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("mastodon".to_owned()),
|
nickname: Some("mastodon".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ fn main() {
|
||||||
// And then spawn a new future that performs the given action each time it fires.
|
// And then spawn a new future that performs the given action each time it fires.
|
||||||
reactor.register_future(send_interval.map_err(IrcError::Timer).for_each(move |()| {
|
reactor.register_future(send_interval.map_err(IrcError::Timer).for_each(move |()| {
|
||||||
// Anything in here will happen every 10 seconds!
|
// Anything in here will happen every 10 seconds!
|
||||||
send_client.send_privmsg("#irc-crate", "TOOT TOOT")
|
send_client.send_privmsg("#rust-spam", "AWOOOOOOOOOO")
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Then, on the main thread, we finally run the reactor which blocks the program indefinitely.
|
// Then, on the main thread, we finally run the reactor which blocks the program indefinitely.
|
||||||
|
|
|
@ -9,8 +9,8 @@ use irc::client::prelude::*;
|
||||||
fn main() {
|
fn main() {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.fyrechat.net".to_owned()),
|
server: Some("irc.mozilla.org".to_owned()),
|
||||||
channels: Some(vec!["#irc-crate".to_owned()]),
|
channels: Some(vec!["#rust-spam".to_owned()]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let client = IrcClient::from_config(config).unwrap();
|
let client = IrcClient::from_config(config).unwrap();
|
||||||
|
@ -21,7 +21,7 @@ fn main() {
|
||||||
client2.stream().map(|m| print!("{}", m)).wait().count();
|
client2.stream().map(|m| print!("{}", m)).wait().count();
|
||||||
});
|
});
|
||||||
loop {
|
loop {
|
||||||
client.send_privmsg("#irc-crate", "TWEET TWEET").unwrap();
|
client.send_privmsg("#rust-spam", "TWEET TWEET").unwrap();
|
||||||
thread::sleep(Duration::new(10, 0));
|
thread::sleep(Duration::new(10, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue