Permalink
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...
1 parent e0c5c3b commit 37e6bbd6aea9c8f5f77d11be180a6c4591e81632 Alexey Sokolov committed Apr 21, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 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

0 comments on commit 37e6bbd

Please sign in to comment.