Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow log module to get no arguments.

This was broken since znc-0.098-17-g64e565c (563bce5)
which introduced possibility of log module to specify wanted path as argument.

Thanks to turnor for reporting this.
  • Loading branch information...
commit 37e6bbd6aea9c8f5f77d11be180a6c4591e81632 1 parent e0c5c3b
Alexey Sokolov authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 modules/extra/log.cpp
5 modules/extra/log.cpp
View
@@ -128,7 +128,10 @@ bool CLogMod::OnLoad(const CString& sArgs, CString& sMessage)
// Add default filename to path if it's a folder
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW")==string::npos)
{
- m_sLogPath += "/$WINDOW_%Y%m%d.log";
+ if (!m_sLogPath.empty()) {
+ m_sLogPath += "/";
+ }
+ m_sLogPath += "$WINDOW_%Y%m%d.log";
}
// Check if it's allowed to write in this path in general
Please sign in to comment.
Something went wrong with that request. Please try again.