summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-04-16 02:52:31 +0100
committerSadie Powell <sadie@witchery.services>2025-04-16 02:52:31 +0100
commit94c20f30846a4b49fff8182fcdeb565806f60ff0 (patch)
tree7a2f979da02221bdb2adc793e99e16d44de3387b /modules
parent597d4a1aeea2490b8595696ccffc2e2b10d3c23b (diff)
Use duration strings when reporting the expiry period.
Diffstat (limited to 'modules')
-rw-r--r--modules/chanserv/chanserv.cpp7
-rw-r--r--modules/nickserv/nickserv.cpp6
2 files changed, 7 insertions, 6 deletions
diff --git a/modules/chanserv/chanserv.cpp b/modules/chanserv/chanserv.cpp
index 38d2f0ef0..a79534d93 100644
--- a/modules/chanserv/chanserv.cpp
+++ b/modules/chanserv/chanserv.cpp
@@ -280,16 +280,17 @@ public:
{
if (!params.empty() || source.c || source.service != *ChanServ)
return;
+
time_t chanserv_expire = Config->GetModule(this).Get<time_t>("expire", "30d");
- if (chanserv_expire >= 86400)
+ if (chanserv_expire)
{
source.Reply(" ");
source.Reply(_(
- "Note that any channel which is not used for %lu days "
+ "Note that any channel which is not used for %s "
"(i.e. which no user on the channel's access list enters "
"for that period of time) will be automatically dropped."
),
- (unsigned long)chanserv_expire / 86400);
+ Anope::Duration(chanserv_expire, source.nc).c_str());
}
if (source.IsServicesOper())
{
diff --git a/modules/nickserv/nickserv.cpp b/modules/nickserv/nickserv.cpp
index 36d32d236..11edb8b55 100644
--- a/modules/nickserv/nickserv.cpp
+++ b/modules/nickserv/nickserv.cpp
@@ -546,15 +546,15 @@ public:
}
time_t nickserv_expire = Config->GetModule(this).Get<time_t>("expire", "1y");
- if (nickserv_expire >= 86400)
+ if (nickserv_expire)
{
source.Reply(" ");
source.Reply(_(
"Accounts that are not used anymore are subject to "
"the automatic expiration, i.e. they will be deleted "
- "after %lu days if not used."
+ "after %s if not used."
),
- (unsigned long)nickserv_expire / 86400);
+ Anope::Duration(nickserv_expire, source.nc).c_str());
}
}