From 45fa01dc79889c68734a7629e8487917cf26a836 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 19 Feb 2006 13:07:27 +0000 Subject: Should fix case insensitivity issue git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3239 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_censor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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); } } } -- cgit v1.2.3