mirror of
https://github.com/znc/znc.git
synced 2026-08-12 03:42:48 +02:00
Use that new define everywhere
Now there are no uses of DEBUG_ONLY() left :( git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1349 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -86,7 +86,7 @@ public:
|
||||
}
|
||||
|
||||
if (pUser && m_Cache.HasItem(CString(Auth->GetUsername() + ":" + Auth->GetPassword()).MD5())) {
|
||||
DEBUG_ONLY(cerr << "+++ Found in cache" << endl);
|
||||
DEBUG("+++ Found in cache");
|
||||
Auth->AcceptLogin(*pUser);
|
||||
return HALT;
|
||||
}
|
||||
@@ -140,10 +140,10 @@ void CIMAPSock::ReadLine(const CString& sLine) {
|
||||
if (pUser && sLine.Equals("AUTH OK", false, 7)) {
|
||||
m_spAuth->AcceptLogin(*pUser);
|
||||
m_pIMAPMod->CacheLogin(CString(m_spAuth->GetUsername() + ":" + m_spAuth->GetPassword()).MD5()); // Use MD5 so passes don't sit in memory in plain text
|
||||
DEBUG_ONLY(cerr << "+++ Successful IMAP lookup" << endl);
|
||||
DEBUG("+++ Successful IMAP lookup");
|
||||
} else {
|
||||
m_spAuth->RefuseLogin("Invalid Password");
|
||||
DEBUG_ONLY(cerr << "--- FAILED IMAP lookup" << endl);
|
||||
DEBUG("--- FAILED IMAP lookup");
|
||||
}
|
||||
|
||||
m_bSentReply = true;
|
||||
|
||||
+3
-3
@@ -282,7 +282,7 @@ public:
|
||||
sTmp[a] = ' ';
|
||||
}
|
||||
PutModule(sTmp);
|
||||
DEBUG_ONLY(cerr << sTmp << endl);
|
||||
DEBUG(sTmp);
|
||||
}
|
||||
|
||||
CSockManager * GetSockManager() { return(m_pManager); }
|
||||
@@ -1051,7 +1051,7 @@ void CModPerl::LoadPerlMod(const CString & sModule)
|
||||
{
|
||||
if (!m_pUser)
|
||||
{
|
||||
DEBUG_ONLY(cerr << "LoadPerlMod: No User is set!!!" << endl);
|
||||
DEBUG("LoadPerlMod: No User is set!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1082,7 +1082,7 @@ void CModPerl::UnloadPerlMod(const CString & sModule)
|
||||
DestroyAllSocks(sModule);
|
||||
if (!m_pUser)
|
||||
{
|
||||
DEBUG_ONLY(cerr << "UnloadPerlMod: No User is set!!!" << endl);
|
||||
DEBUG("UnloadPerlMod: No User is set!!!");
|
||||
return;
|
||||
}
|
||||
Eval("ZNC::COREUnloadMod('" + m_pUser->GetUserName() + "', '" + sModule + "');");
|
||||
|
||||
@@ -62,17 +62,17 @@ public:
|
||||
CString const key(CString(user + ":" + pass).MD5());
|
||||
if (m_Cache.HasItem(key)) {
|
||||
Auth->AcceptLogin(*pUser);
|
||||
DEBUG_ONLY(cerr << "+++ Found in cache" << endl);
|
||||
DEBUG("+++ Found in cache");
|
||||
}
|
||||
else if (sasl_server_new("znc", NULL, NULL, NULL, NULL, cbs, 0, &sasl_conn) == SASL_OK &&
|
||||
sasl_checkpass(sasl_conn, user.c_str(), user.size(), pass.c_str(), pass.size()) == SASL_OK) {
|
||||
Auth->AcceptLogin(*pUser);
|
||||
m_Cache.AddItem(key);
|
||||
DEBUG_ONLY(cerr << "+++ Successful SASL password check" << endl);
|
||||
DEBUG("+++ Successful SASL password check");
|
||||
}
|
||||
else {
|
||||
Auth->RefuseLogin("SASL Authentication failed");
|
||||
DEBUG_ONLY(cerr << "--- FAILED SASL password check" << endl);
|
||||
DEBUG("--- FAILED SASL password check");
|
||||
}
|
||||
|
||||
sasl_dispose(&sasl_conn);
|
||||
|
||||
@@ -609,14 +609,14 @@ bool CWebAdminSock::SettingsPage(CString& sPageRet) {
|
||||
CModule *pMod = CZNC::Get().GetModules().FindModule(sModName);
|
||||
if (!pMod) {
|
||||
if (!CZNC::Get().GetModules().LoadModule(sModName, sArgs, NULL, sModRet)) {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sModRet << "]" << endl);
|
||||
DEBUG("Unable to load module [" << sModName << "] [" << sModRet << "]");
|
||||
}
|
||||
} else if (pMod->GetArgs() != sArgs) {
|
||||
if (!CZNC::Get().GetModules().ReloadModule(sModName, sArgs, NULL, sModRet)) {
|
||||
DEBUG_ONLY(cerr << "Unable to reload module [" << sModName << "] [" << sModRet << "]" << endl);
|
||||
DEBUG("Unable to reload module [" << sModName << "] [" << sModRet << "]");
|
||||
}
|
||||
} else {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] because it is already loaded" << endl);
|
||||
DEBUG("Unable to load module [" << sModName << "] because it is already loaded");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1047,10 +1047,10 @@ CUser* CWebAdminSock::GetNewUser(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
try {
|
||||
if (!pNewUser->GetModules().LoadModule(sModName, sArgs, pNewUser, sModRet, (pUser != NULL))) {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sModRet << "]" << endl);
|
||||
DEBUG("Unable to load module [" << sModName << "] [" << sModRet << "]");
|
||||
}
|
||||
} catch (...) {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sArgs << "]" << endl);
|
||||
DEBUG("Unable to load module [" << sModName << "] [" << sArgs << "]");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1064,10 +1064,10 @@ CUser* CWebAdminSock::GetNewUser(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
try {
|
||||
if (!pNewUser->GetModules().LoadModule(sModName, sArgs, pNewUser, sModRet, (pUser != NULL))) {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "] [" << sModRet << "]" << endl);
|
||||
DEBUG("Unable to load module [" << sModName << "] [" << sModRet << "]");
|
||||
}
|
||||
} catch (...) {
|
||||
DEBUG_ONLY(cerr << "Unable to load module [" << sModName << "]" << endl);
|
||||
DEBUG("Unable to load module [" << sModName << "]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user