hopefully bugfix for chatbot regression (#164)

This commit is contained in:
doitux
2012-12-25 22:31:49 +01:00
parent d9d56300bb
commit 341c564d49
3 changed files with 7 additions and 4 deletions
-2
View File
@@ -46,7 +46,6 @@ bool BadWordCheck::run(QString msg)
QString bw=it.next();
if(msg.contains(bw)) {
badMessage=true;
//exception check
QStringListIterator it2(badWordsException);
while (it2.hasNext()) {
@@ -60,5 +59,4 @@ bool BadWordCheck::run(QString msg)
if(badMessage) return true;
else return false;
}
+6 -1
View File
@@ -54,7 +54,7 @@ using namespace std;
CleanerConfig::CleanerConfig()
{
// !!!! Revisionsnummer der Configdefaults !!!!!
configRev = 9;
configRev = 10;
// Pfad und Dateinamen setzen
#ifdef _WIN32
@@ -149,6 +149,7 @@ CleanerConfig::CleanerConfig()
badWordsList.push_back("gay");
badWordsList.push_back("horny");
badWordsList.push_back("hure");
badWordsList.push_back("idiot");
badWordsList.push_back("mistgeburt");
badWordsList.push_back("missgeburt");
badWordsList.push_back("motherfucker");
@@ -171,6 +172,10 @@ CleanerConfig::CleanerConfig()
list<string> badWordsExceptionList;
badWordsExceptionList.push_back("idiots end");
badWordsExceptionList.push_back("all-in-idiot");
badWordsExceptionList.push_back("all-in idiot");
badWordsExceptionList.push_back("allin idiot");
badWordsExceptionList.push_back("all in idiot");
configList.push_back(ConfigInfo("BadWordsException", CONFIG_TYPE_STRING_LIST, "BadWordsException", badWordsExceptionList));
+1 -1
View File
@@ -214,7 +214,7 @@ void MessageFilter::refreshConfig()
}
myBadWordCheck->setBadWords(bwList);
std::list<std::string> badWordsExceptionList = config->readConfigStringList("BadWordsList");
std::list<std::string> badWordsExceptionList = config->readConfigStringList("BadWordsException");
std::list<std::string>::iterator it1;
QStringList bweList;
for(it1= badWordsExceptionList.begin(); it1 != badWordsExceptionList.end(); ++it1) {