From 627f8d1403a8fad13c0558203f99bdb9fbbac574 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 18 Mar 2025 14:16:23 +0000 Subject: Allow using the long duration format in the xline message. --- src/xline.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/xline.cpp') diff --git a/src/xline.cpp b/src/xline.cpp index d39a1c97e..e48d1010b 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -556,14 +556,16 @@ void XLine::DefaultApply(User* u, bool bancache) u->WriteNumeric(ERR_YOUREBANNEDCREEP, ServerInstance->Config->XLineMessage); Template::VariableMap vars = { - { "created", Time::ToString(set_time) }, - { "duration", Duration::ToString(duration) }, - { "expiry", Time::ToString(expiry) }, - { "fulltype", type.length() <= 2 ? type + "-lined" : type }, - { "reason", reason }, - { "remaining", Duration::ToString(ServerInstance->Time() - expiry) }, - { "setter", source }, - { "type", type }, + { "created", Time::ToString(set_time) }, + { "duration", Duration::ToString(duration) }, + { "duration.long", Duration::ToLongString(duration) }, + { "expiry", Time::ToString(expiry) }, + { "fulltype", type.length() <= 2 ? type + "-lined" : type }, + { "reason", reason }, + { "remaining", Duration::ToString(ServerInstance->Time() - expiry) }, + { "remaining.long", Duration::ToLongString(ServerInstance->Time() - expiry) }, + { "setter", source }, + { "type", type }, }; const std::string banreason = Template::Replace(ServerInstance->Config->XLineQuit, vars); -- cgit v1.3.1-10-gc9f91