hopefully bugfix for chatbot regression (#164)
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user