This commit is contained in:
parent
06e54075a8
commit
63a0597cd1
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use irc::client::prelude::*;
|
use irc::client::prelude::*;
|
||||||
use futures::prelude::*;
|
use futures::prelude::*;
|
||||||
use std::process;
|
use std::{process, collections::HashMap};
|
||||||
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@ -11,14 +11,14 @@ async fn main() -> Result<(), failure::Error> {
|
|||||||
let config = Config {
|
let config = Config {
|
||||||
nickname: Some(gethostname::gethostname().to_str().unwrap().to_owned()),
|
nickname: Some(gethostname::gethostname().to_str().unwrap().to_owned()),
|
||||||
server: Some("irc.ouch.chat".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()
|
..Config::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut client = Client::from_config(config).await?;
|
let mut client = Client::from_config(config).await?;
|
||||||
client.identify()?;
|
client.identify()?;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let mut stream = client.stream()?;
|
let mut stream = client.stream()?;
|
||||||
let sender = client.sender();
|
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")?;
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user