using in headers is evil :(

This commit is contained in:
Alexey Sokolov
2012-07-26 20:46:11 +07:00
parent f1932b9322
commit 62c9ac1a0b
65 changed files with 234 additions and 154 deletions
+5 -3
View File
@@ -13,6 +13,8 @@
#include <znc/Chan.h>
#include <znc/Server.h>
using std::vector;
class CLogMod: public CModule {
public:
MODCONSTRUCTOR(CLogMod) {}
@@ -121,21 +123,21 @@ bool CLogMod::OnLoad(const CString& sArgs, CString& sMessage)
// Add default filename to path if it's a folder
if (GetType() == CModInfo::UserModule) {
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW") == string::npos || m_sLogPath.find("$NETWORK") == string::npos) {
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW") == CString::npos || m_sLogPath.find("$NETWORK") == CString::npos) {
if (!m_sLogPath.empty()) {
m_sLogPath += "/";
}
m_sLogPath += "$NETWORK_$WINDOW_%Y%m%d.log";
}
} else if (GetType() == CModInfo::NetworkModule) {
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW") == string::npos) {
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW") == CString::npos) {
if (!m_sLogPath.empty()) {
m_sLogPath += "/";
}
m_sLogPath += "$WINDOW_%Y%m%d.log";
}
} else {
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$USER") == string::npos || m_sLogPath.find("$WINDOW") == string::npos || m_sLogPath.find("$NETWORK") == string::npos) {
if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$USER") == CString::npos || m_sLogPath.find("$WINDOW") == CString::npos || m_sLogPath.find("$NETWORK") == CString::npos) {
if (!m_sLogPath.empty()) {
m_sLogPath += "/";
}