summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-05-10 14:35:03 +0100
committerSadie Powell <sadie@witchery.services>2025-05-10 14:40:12 +0100
commite9a0a214b0b8454a506321164ee4318d3cee7ddd (patch)
tree3881c2f0e9af208ab2c4745437211a9553600fda /src
parent46c5570b1d900976aa0868ceae33ab8e81dc4287 (diff)
Refactor Anope::strftime.
Diffstat (limited to 'src')
-rw-r--r--src/misc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index d8a6e8f72..f30fa9d19 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -547,11 +547,11 @@ Anope::string Anope::strftime(time_t t, const NickCore *nc, bool short_output)
return buf;
if (t < Anope::CurTime)
- return Anope::string(buf) + " " + Anope::printf(Language::Translate(nc, _("(%s ago)")), Duration(Anope::CurTime - t, nc).c_str(), nc);
+ return Anope::printf(Language::Translate(nc, _("%s (%s ago)")), buf, Duration(Anope::CurTime - t, nc).c_str());
else if (t > Anope::CurTime)
- return Anope::string(buf) + " " + Anope::printf(Language::Translate(nc, _("(%s from now)")), Duration(t - Anope::CurTime, nc).c_str(), nc);
+ return Anope::printf(Language::Translate(nc, _("%s (%s from now)")), buf, Duration(t - Anope::CurTime, nc).c_str(), nc);
else
- return Anope::string(buf) + " " + Language::Translate(nc, _("(now)"));
+ return Anope::printf(Language::Translate(nc, _("%s (now)")), buf);
}
Anope::string Anope::Expires(time_t expires, const NickCore *nc)