summaryrefslogtreecommitdiff
path: root/modules/commands/os_logsearch.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-01 13:43:13 -0400
committerAdam <Adam@anope.org>2012-11-01 14:47:23 -0400
commitb64abebd249e773910bd44bdb85c48a3b631ca59 (patch)
tree98e5d9c3f907d086bf4328cbeacbb30c8a376e18 /modules/commands/os_logsearch.cpp
parent90930619bc124e94bac5048c0b13c3f4748b559d (diff)
Made os_logsearch search oldest logs first so the newest entries are at the bottom of the list
Diffstat (limited to 'modules/commands/os_logsearch.cpp')
-rw-r--r--modules/commands/os_logsearch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/commands/os_logsearch.cpp b/modules/commands/os_logsearch.cpp
index fab1ced51..12431798c 100644
--- a/modules/commands/os_logsearch.cpp
+++ b/modules/commands/os_logsearch.cpp
@@ -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;