diff options
author | Walliski <walliski@gmail.com> | 2015-10-20 19:01:59 +0300 |
---|---|---|
committer | Walliski <walliski@gmail.com> | 2015-10-20 19:01:59 +0300 |
commit | b8d3588412a591230d1de5e81d77cbc62f98f528 (patch) | |
tree | f9b85319d66eeedb93096faf147eee6dcadd6e17 | |
parent | cbb5657eec179a810d078e10157c04e09baaa903 (diff) |
Print logfile name
-rw-r--r-- | backlog.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backlog.cpp b/backlog.cpp index 4a8f816..900cd6b 100644 --- a/backlog.cpp +++ b/backlog.cpp @@ -136,7 +136,13 @@ void CBacklogMod::OnModCommand(const CString& sCommand) { CString Line; std::vector<CString> Lines; + if (LogFile.GetShortName() == "." || LogFile.GetShortName() == "..") { + continue; + } + if (LogFile.Open()) { + Lines.push_back("[00:00:00] <***> File: " + LogFile.GetShortName()); //Parse name to get date prettier? + printedLines--; while (LogFile.ReadLine(Line)) { try { // is line a part/join/rename etc message (nick ***), do we want to print it? @@ -173,7 +179,7 @@ void CBacklogMod::OnModCommand(const CString& sCommand) { } } - if(printedLines == 0) { + if(printedLines <= 0) { m_pNetwork->PutUser(":***!znc@znc.in PRIVMSG " + Channel + " :No log files found for window " + Channel + " in " + DirPath + "/", GetClient()); return; } else { |