diff options
| author | 2025-03-22 14:29:12 +0000 | |
|---|---|---|
| committer | 2025-03-22 14:37:15 +0000 | |
| commit | 30d0f2827215f635f4cdefed8300c1c085ae953c (patch) | |
| tree | 7fc4837accfb8d7bed95449eeb816e84bfa87ea6 /src/xline.cpp | |
| parent | Allow reloading the geolocation database with a module rehash. (diff) | |
| parent | Allow using the long duration format in the xline message. (diff) | |
Merge branch 'insp4' into master.
Diffstat (limited to 'src/xline.cpp')
| -rw-r--r-- | src/xline.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index b297ed6c2..b33564030 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); @@ -707,7 +709,7 @@ void XLine::DisplayExpiry() { ServerInstance->SNO.WriteToSnoMask('x', "Removing an expired {}{} on {} (set by {} {} ago): {}", type, (type.length() <= 2 ? "-line" : ""), Displayable(), source, - Duration::ToHuman(ServerInstance->Time() - set_time), reason); + Duration::ToLongString(ServerInstance->Time() - set_time), reason); } const std::string& ELine::Displayable() const |
