migrate all the examples and tests to freenode
This commit is contained in:
parent
9e21dcf3c2
commit
5968edd355
10 changed files with 15 additions and 15 deletions
|
@ -61,7 +61,7 @@ async fn main() -> Result<(), failure::Error> {
|
||||||
// We can also load the Config at runtime via Config::load("path/to/config.toml")
|
// We can also load the Config at runtime via Config::load("path/to/config.toml")
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("the-irc-crate".to_owned()),
|
nickname: Some("the-irc-crate".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: Some(vec!["#test".to_owned()]),
|
channels: Some(vec!["#test".to_owned()]),
|
||||||
..Config::default()
|
..Config::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ async fn main() -> irc::error::Result<()> {
|
||||||
|
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("irc-crate-ci".to_owned()),
|
nickname: Some("irc-crate-ci".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
alt_nicks: vec!["[irc-crate-ci]".to_owned()],
|
alt_nicks: vec!["[irc-crate-ci]".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,14 +7,14 @@ async fn main() -> irc::error::Result<()> {
|
||||||
|
|
||||||
let cfg1 = Config {
|
let cfg1 = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: 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.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ use irc::client::prelude::*;
|
||||||
async fn main() -> irc::error::Result<()> {
|
async fn main() -> irc::error::Result<()> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
burst_window_length: Some(4),
|
burst_window_length: Some(4),
|
||||||
max_messages_in_burst: Some(4),
|
max_messages_in_burst: Some(4),
|
||||||
|
|
|
@ -5,7 +5,7 @@ use irc::client::prelude::*;
|
||||||
async fn main() -> irc::error::Result<()> {
|
async fn main() -> irc::error::Result<()> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ use irc::client::prelude::*;
|
||||||
async fn main() -> irc::error::Result<()> {
|
async fn main() -> irc::error::Result<()> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
use_tls: Some(false),
|
use_tls: Some(false),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -5,7 +5,7 @@ use irc::client::prelude::*;
|
||||||
async fn main() -> irc::error::Result<()> {
|
async fn main() -> irc::error::Result<()> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
proxy_type: Some(ProxyType::Socks5),
|
proxy_type: Some(ProxyType::Socks5),
|
||||||
proxy_server: Some("127.0.0.1".to_owned()),
|
proxy_server: Some("127.0.0.1".to_owned()),
|
||||||
|
|
|
@ -7,7 +7,7 @@ use std::time::Duration;
|
||||||
async fn main() -> irc::error::Result<()> {
|
async fn main() -> irc::error::Result<()> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("mastodon".to_owned()),
|
nickname: Some("mastodon".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@ use std::time::Duration;
|
||||||
async fn main() -> irc::error::Result<()> {
|
async fn main() -> irc::error::Result<()> {
|
||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some("pickles".to_owned()),
|
nickname: Some("pickles".to_owned()),
|
||||||
server: Some("irc.pdgn.co".to_owned()),
|
server: Some("chat.freenode.net".to_owned()),
|
||||||
channels: vec!["#rust-spam".to_owned()],
|
channels: vec!["#rust-spam".to_owned()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -1208,7 +1208,7 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn handle_end_motd_with_ghost() -> Result<()> {
|
async fn handle_end_motd_with_ghost() -> Result<()> {
|
||||||
let value = ":irc.pdgn.co 433 * test :Nickname is already in use.\r\n\
|
let value = ":irc.test.net 433 * test :Nickname is already in use.\r\n\
|
||||||
:irc.test.net 376 test2 :End of /MOTD command.\r\n";
|
:irc.test.net 376 test2 :End of /MOTD command.\r\n";
|
||||||
let mut client = Client::from_config(Config {
|
let mut client = Client::from_config(Config {
|
||||||
mock_initial_value: Some(value.to_owned()),
|
mock_initial_value: Some(value.to_owned()),
|
||||||
|
@ -1231,7 +1231,7 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn handle_end_motd_with_ghost_seq() -> Result<()> {
|
async fn handle_end_motd_with_ghost_seq() -> Result<()> {
|
||||||
let value = ":irc.pdgn.co 433 * test :Nickname is already in use.\r\n\
|
let value = ":irc.test.net 433 * test :Nickname is already in use.\r\n\
|
||||||
:irc.test.net 376 test2 :End of /MOTD command.\r\n";
|
:irc.test.net 376 test2 :End of /MOTD command.\r\n";
|
||||||
let mut client = Client::from_config(Config {
|
let mut client = Client::from_config(Config {
|
||||||
mock_initial_value: Some(value.to_owned()),
|
mock_initial_value: Some(value.to_owned()),
|
||||||
|
@ -1275,7 +1275,7 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn nickname_in_use() -> Result<()> {
|
async fn nickname_in_use() -> Result<()> {
|
||||||
let value = ":irc.pdgn.co 433 * test :Nickname is already in use.\r\n";
|
let value = ":irc.test.net 433 * test :Nickname is already in use.\r\n";
|
||||||
let mut client = Client::from_config(Config {
|
let mut client = Client::from_config(Config {
|
||||||
mock_initial_value: Some(value.to_owned()),
|
mock_initial_value: Some(value.to_owned()),
|
||||||
..test_config()
|
..test_config()
|
||||||
|
@ -1288,8 +1288,8 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn ran_out_of_nicknames() -> Result<()> {
|
async fn ran_out_of_nicknames() -> Result<()> {
|
||||||
let value = ":irc.pdgn.co 433 * test :Nickname is already in use.\r\n\
|
let value = ":irc.test.net 433 * test :Nickname is already in use.\r\n\
|
||||||
:irc.pdgn.co 433 * test2 :Nickname is already in use.\r\n";
|
:irc.test.net 433 * test2 :Nickname is already in use.\r\n";
|
||||||
let mut client = Client::from_config(Config {
|
let mut client = Client::from_config(Config {
|
||||||
mock_initial_value: Some(value.to_owned()),
|
mock_initial_value: Some(value.to_owned()),
|
||||||
..test_config()
|
..test_config()
|
||||||
|
|
Loading…
Add table
Reference in a new issue