Skip to content

Commit

Permalink
Allow log module to get no arguments.
Browse files Browse the repository at this point in the history
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
Alexey Sokolov committed Apr 21, 2011
1 parent e0c5c3b commit 37e6bbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/extra/log.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 37e6bbd

Please sign in to comment.