1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 00:43:12 +02:00

Made os_logsearch search oldest logs first so the newest entries are at the bottom of the list

This commit is contained in:
Adam
2012-11-01 13:43:13 -04:00
parent 90930619bc
commit b64abebd24
+2 -2
View File
@@ -92,7 +92,7 @@ class CommandOSLogSearch : public Command
Log(LOG_ADMIN, source, this) << "for " << search_string;
std::list<Anope::string> matches;
for (int d = 0; d < days; ++d)
for (int d = days - 1; d >= 0; --d)
{
Anope::string lf_name = CreateLogName(logfile_name, Anope::CurTime - (d * 86400));
Log(LOG_DEBUG) << "Searching " << lf_name;
@@ -136,7 +136,7 @@ class CommandOSLogSearch : public Command
"to 50.\n"
"\n"
"For example:\n"
" \2LOGSEARCH 21d 500l Anope\2\n"
" \2LOGSEARCH +21d +500l Anope\2\n"
" Searches the last 21 days worth of logs for messages\n"
" containing Anope and lists the most recent 500 of them.\n"));
return true;