summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-10-05 13:21:28 -0400
committerAdam <Adam@anope.org>2013-10-05 13:21:28 -0400
commit1b08ba8f4176217d43e7d8ca1ce23a06e33d2378 (patch)
tree84417b0aea49fe3f74d54fe62dd08135b9126d40 /src/misc.cpp
parent277f735505ccb16d6fcc15ad21af4325e58f3615 (diff)
Always show expire time for nicks in /ns info to opers, even if the user is online
Make Anope::strftime show "now" if the time is now Fix typo in nickalias.cpp for the type of the last_seen field, spotted by grawity
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index 33ac56bcd..c6645dee2 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -362,8 +362,10 @@ 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);
- else
+ 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);
+ else
+ return Anope::string(buf) + " " + Language::Translate(nc, _("(now)"));
}
Anope::string Anope::Expires(time_t expires, const NickCore *nc)