Rename avatar_ttl to cache_ttl

This commit is contained in:
Yash Karandikar 2022-08-05 11:50:10 -05:00
parent b4551d68d4
commit 7ec420b23a
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -38,7 +38,7 @@ struct DircordConfig {
channels: HashMap<String, u64>,
webhooks: Option<HashMap<String, String>>,
ref_content_limit: Option<u16>,
avatar_ttl: Option<u64>,
cache_ttl: Option<u64>,
}
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() {