summaryrefslogtreecommitdiff
path: root/src/modules/m_callerid.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-21 17:20:28 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-21 17:20:28 +0200
commit6e79197210e58d69e7bd512d0b5569c4cb06f3e5 (patch)
tree24c7aaa6e1b5ecb0687803371b3bec5032a4c144 /src/modules/m_callerid.cpp
parent4b8b3eca8cd30fe6c992c86a333b2defa79ba765 (diff)
Log some internal errors on DEFAULT loglevel instead of DEBUG, log detected errors in m_callerid
Diffstat (limited to 'src/modules/m_callerid.cpp')
-rw-r--r--src/modules/m_callerid.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 4b167f2db..37787b525 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -116,11 +116,16 @@ struct CallerIDExtInfo : public ExtensionItem
callerid_data *targ = this->get(*it, false);
if (!targ)
+ {
+ ServerInstance->Logs->Log("m_callerid", DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (1)");
continue; // shouldn't happen, but oh well.
+ }
std::list<callerid_data*>::iterator it2 = std::find(targ->wholistsme.begin(), targ->wholistsme.end(), dat);
if (it2 != targ->wholistsme.end())
targ->wholistsme.erase(it2);
+ else
+ ServerInstance->Logs->Log("m_callerid", DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (2)");
}
delete dat;
}
@@ -280,6 +285,7 @@ public:
if (!dat2)
{
// How the fuck is this possible.
+ ServerInstance->Logs->Log("m_callerid", DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (3)");
return false;
}
@@ -287,6 +293,9 @@ public:
if (it != dat2->wholistsme.end())
// Found me!
dat2->wholistsme.erase(it);
+ else
+ ServerInstance->Logs->Log("m_callerid", DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (4)");
+
user->WriteServ("NOTICE %s :%s is no longer on your accept list", user->nick.c_str(), whotoremove->nick.c_str());
return true;
@@ -324,6 +333,8 @@ private:
if (it2 != dat->accepting.end())
dat->accepting.erase(it2);
+ else
+ ServerInstance->Logs->Log("m_callerid", DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (5)");
}
userdata->wholistsme.clear();