From 63a0597cd10f23d688682cf88ea81026e31b8554 Mon Sep 17 00:00:00 2001 From: blackbeard420 Date: Thu, 28 Dec 2023 21:52:08 -0500 Subject: [PATCH] channel keys --- src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index d842a66..099f0d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use irc::client::prelude::*; use futures::prelude::*; -use std::process; +use std::{process, collections::HashMap}; #[tokio::main] @@ -11,14 +11,14 @@ async fn main() -> Result<(), failure::Error> { let config = Config { nickname: Some(gethostname::gethostname().to_str().unwrap().to_owned()), server: Some("irc.ouch.chat".to_owned()), + channels: vec!["#botnet".to_owned()], + channel_keys: HashMap::from([("#botnet".to_owned(), "fuckyou".to_owned())]), ..Config::default() }; let mut client = Client::from_config(config).await?; client.identify()?; - - let mut stream = client.stream()?; let sender = client.sender(); @@ -83,9 +83,6 @@ async fn main() -> Result<(), failure::Error> { } } } - Command::MOTD(ref _motd) => { - client.send_join_with_keys::<&str, &str>("#botnet", "fuckyou")?; - } _ => {} } }