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,