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() {