1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 09:56:38 +02:00

Added os_config and support for including additional configuration files.

This commit is contained in:
Adam
2011-03-11 00:47:28 -05:00
parent 97c2e0957d
commit 1ee3d3d810
22 changed files with 891 additions and 668 deletions
+3 -4
View File
@@ -201,11 +201,10 @@ time_t dotime(const Anope::string &s)
/**
* Expresses in a string the period of time represented by a given amount
* of seconds (with days/hours/minutes).
* @param na Nick Alias
* @param seconds time in seconds
* @return buffer
*/
Anope::string duration(NickCore *nc, time_t seconds)
Anope::string duration(time_t seconds)
{
/* We first calculate everything */
time_t days = seconds / 86400;
@@ -248,9 +247,9 @@ Anope::string do_strftime(const time_t &t)
char buf[BUFSIZE];
strftime(buf, sizeof(buf), "%b %d %H:%M:%S %Y %Z", &tm);
if (t < Anope::CurTime)
return Anope::string(buf) + " (" + duration(NULL, Anope::CurTime - t) + " ago)";
return Anope::string(buf) + " (" + duration(Anope::CurTime - t) + " ago)";
else
return Anope::string(buf) + " (" + duration(NULL, t - Anope::CurTime) + " from now)";
return Anope::string(buf) + " (" + duration(t - Anope::CurTime) + " from now)";
}
/*************************************************************************/