From 7ec420b23a3da5103abe116e608773b214276902 Mon Sep 17 00:00:00 2001 From: Yash Karandikar Date: Fri, 5 Aug 2022 11:50:10 -0500 Subject: [PATCH] Rename avatar_ttl to cache_ttl --- sample_config.toml | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sample_config.toml b/sample_config.toml index 3e5fd8c..c35f3bf 100644 --- a/sample_config.toml +++ b/sample_config.toml @@ -6,7 +6,7 @@ tls = true # OPTIONAL: DEFAULT: false mode = "+B" # OPTIONAL: DEFAULT: none raw_prefix = "++" # OPTIONAL: DEFAULT: ++ ref_content_limit = 512 # OPTIONAL: where to truncate replied messages. Defaults to ~512 minus the prefix -avatar_ttl = 1800 # OPTIONAL: how long to store the avatar cache, in seconds. Defaults to 1800 (30 minutes) +cache_ttl = 1800 # OPTIONAL: how long to store caches, in seconds. Defaults to 1800 (30 minutes) [channels] # irc channel name -> discord channel id diff --git a/src/main.rs b/src/main.rs index 95b0f1f..2123b89 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,7 @@ struct DircordConfig { channels: HashMap, webhooks: Option>, ref_content_limit: Option, - avatar_ttl: Option, + cache_ttl: Option, } macro_rules! type_map_key { @@ -154,7 +154,7 @@ async fn main() -> anyhow::Result<()> { } select! { - r = irc_loop(irc_client, http.clone(), cache.clone(), channels.clone(), webhooks_transformed, members, conf.avatar_ttl) => r.unwrap(), + r = irc_loop(irc_client, http.clone(), cache.clone(), channels.clone(), webhooks_transformed, members, conf.cache_ttl) => r.unwrap(), r = discord_client.start() => r.unwrap(), _ = terminate_signal() => { for (_, &v) in channels.iter() {