diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-19 13:07:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-19 13:07:27 +0000 |
commit | 45fa01dc79889c68734a7629e8487917cf26a836 (patch) | |
tree | 7a3959707302565a25c73e2d49878dc4bd0c2e7d /src/modules/m_censor.cpp | |
parent | 675698fff9da3b409386b17f18a3d8a7dfe15568 (diff) |
Should fix case insensitivity issue
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3239 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_censor.cpp')
-rw-r--r-- | src/modules/m_censor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index f455cef53..a1a8581a2 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -110,10 +110,11 @@ class ModuleCensor : public Module virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) { bool active = false; + irc::string text2 = text.c_str(); for (int index = 0; index < MyConf->Enumerate("badword"); index++) { - std::string pattern = MyConf->ReadValue("badword","text",index); - if (text.find(pattern) != std::string::npos) + irc::string pattern = (MyConf->ReadValue("badword","text",index)).c_str(); + if (text2.find(pattern) != std::string::npos) { std::string replace = MyConf->ReadValue("badword","replace",index); @@ -130,7 +131,7 @@ class ModuleCensor : public Module if (active) { - this->ReplaceLine(text,pattern,replace); + this->ReplaceLine(text,std::string(pattern.c_str()),replace); } } } |