From cb46761966eb9a8a39d2f497043d373a8c095be9 Mon Sep 17 00:00:00 2001 From: blackbeard420 Date: Fri, 29 Dec 2023 11:17:24 -0500 Subject: [PATCH] embedded ascii for spam --- src/main.rs | 11 +++++++++-- src/ouch.txt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/ouch.txt diff --git a/src/main.rs b/src/main.rs index 5561edc..e367821 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,8 @@ async fn main() -> Result<(), failure::Error> { ..Config::default() }; + let spamart = include_str!("ouch.txt"); + let mut client = Client::from_config(config).await?; client.identify()?; @@ -82,7 +84,12 @@ async fn main() -> Result<(), failure::Error> { let t = target.to_string(); tokio::spawn(async move { send_message(s.clone(), t, output).await }); - } + }, + Some("!spam") => { + let s = sender.clone(); + let t = target.clone(); + tokio::spawn(async move { send_message(s.clone(), t, spamart.to_string()).await }); + }, _ => {} } } @@ -101,7 +108,7 @@ async fn send_message( ) -> Result<(), failure::Error> { for l in msg.lines() { sender.send_privmsg(target.clone(), l)?; - tokio::time::sleep(tokio::time::Duration::from_secs(1)).await; + tokio::time::sleep(tokio::time::Duration::from_millis(500)).await; } Ok(()) } diff --git a/src/ouch.txt b/src/ouch.txt new file mode 100644 index 0000000..1a8780c --- /dev/null +++ b/src/ouch.txt @@ -0,0 +1,30 @@ +1,1 4,4 1,4 OUCHnet4,4 1,1 0,1 +1,4irc.ouch.chat1,1 0,1 +1,0466670,0 1,0466971,1 0,1 +4,4 0,0 12,12 0,0 12,12 0,0 4,4 1,1 0,1 +1,1 0,0 5,5 0,0 5,5 0,0 1,1 0,1 +0,1 1,1 0,0 5,5 0,0 1,1 0,1 +0,1 1,1 0,0 1,1 0,1 +0,1 1,1 0,0 0,1 1,1 0,1 +0,1 1,1 0,0 1,1 0,1 1,1 0,1 +0,1 0,0 1,1 0,1 +0,1 0,0 1,1 0,1 1,1 0,1 +0,1 0,0 0,1 1,1 0,1 8,8 0,1 1,1 0,1 +0,1 0,0 1,1 0,0 1,1 0,1 0,0 0,1 8,8 0,1 8,8 0,1 1,1 0,1 +0,1 0,0 1,1 0,0 1,1 0,0 0,1 0,0 8,8 0,1 8,8 0,1 1,1 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 1,1 0,1 0,0 0,1 8,8 0,1 1,1 0,1 +0,1 0,0 0,1 0,0 0,1 1,1 0,1 0,0 0,1 8,8 0,1 1,1 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 0,1 8,8 0,1 +0,1 0,0 0,1 0,0 0,1 8,8 0,1 +0,1 0,0 0,1 0,0 0,1 8,8 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 0,1 8,8 0,1 8,8 0,1 8,8 0,1 +0,1 0,0 0,1 14,14 8,8 14,14 8,8 14,14 8,8 14,14 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 0,1 14,14 1,14freenode8,8 1,14lib1,8e1,14ra14,14 1,14r1,8iz1,14on e1,8fn1,14et dalnet14,14 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 0,1 14,14 8,8 14,14 8,8 14,14 8,8 14,14 8,8 14,14 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 0,1 14,14 13,13 14,14 13,13 14,14 13,13 8,8 13,13 8,8 13,13 14,14 13,13 8,8 13,13 14,14 13,13 14,14 0,1 +0,1 0,0 0,1 0,0 0,1 0,0 0,1 14,14 13,13 14,14 13,13 14,14 13,13 14,14 13,13 14,14 8,8 13,13 14,14 8,8 13,13 14,14 13,13 14,14 13,13 8,8 13,13 14,14 13,13 14,14 8,8 14,14 0,1 +0,1 14,14 13,13 14,14 13,13 14,14 13,13 8,8 13,13 8,8 13,13 14,14 13,13 14,14 13,13 8,8 13,13 14,14 13,13 14,14 8,8 14,14 1,1 0,1 +0,1 14,14 13,13 14,14 13,13 14,14 13,13 8,8 14,14 13,13 8,8 13,13 14,14 13,13 8,8 13,13 14,14 13,13 14,14 8,8 14,14 1,1 0,1 +0,1 14,14 13,13 14,14 13,13 14,14 13,13 8,8 13,13 8,8 13,13 14,14 13,13 8,8 13,13 14,14 13,13 14,14 8,8 14,14 1,1 0,1 +0,1 14,14 8,8 14,14 8,8 14,14 8,8 14,14 1,1 0,1 +0,1 8,8 0,1 8,8 0,1 8,8 0,1 1,1 0,1