Allow log module to get no arguments.

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

Thanks to turnor for reporting this.
This commit is contained in:
Alexey Sokolov
2011-04-21 10:02:15 +07:00
parent e0c5c3b93c
commit 37e6bbd6ae
+4 -1
View File
@@ -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