From 142b6207200056025c288ac722903dab83915315 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:30:08 -0500 Subject: [PATCH] smol adj --- src/main.rs | 5 +++-- src/ratelimiter.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a578fc6..5e7bb4d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,7 @@ pub async fn main() { for chnl in &botchannels { client.join(chnl.to_owned()).unwrap(); // client.say(chnl.to_owned(), "Connected!".to_owned()).await.unwrap(); - client.say(chnl.to_owned(), "annytfLurk".to_owned()).await.unwrap(); + //client.say(chnl.to_owned(), "annytfLurk".to_owned()).await.unwrap(); } // Adding rate limit functionality to be under : https://dev.twitch.tv/docs/irc/#rate-limits @@ -92,7 +92,8 @@ pub async fn main() { match contextratelimiter.check_limiter() { ratelimiter::LimiterResp::Allow => { let maxblanks = rand::thread_rng().gen_range(1..=5); - let mut outmsg = "GotTrolled ".to_owned(); + //let mut outmsg = "GotTrolled ".to_owned(); + let mut outmsg = "annytfLurk ".to_owned(); for _i in 1..maxblanks { let blankspace: &str = "󠀀"; diff --git a/src/ratelimiter.rs b/src/ratelimiter.rs index 252b287..bc64850 100644 --- a/src/ratelimiter.rs +++ b/src/ratelimiter.rs @@ -4,6 +4,7 @@ use std::time::Instant; const TIME_THRESHOLD_S: u64 = 30; const MSG_THRESHOLD: u32 = 20; + #[derive(Debug)] pub struct RateLimiter { timer: Instant,