diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-04 16:47:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-04 16:47:54 +0000 |
commit | affc69e0b5d99d60764f4a40a2283b7efd4b2a8c (patch) | |
tree | 4c4e1224be45b4ee259189cf10be8550011aa7de | |
parent | cf6d6a06656ce4ded0fca445b1dea5c492151b28 (diff) |
m_censor skenmy fix
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3444 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_censor.cpp | 10 | ||||
-rwxr-xr-x | src/svn-rev.sh | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 0d18ac1e4..b1fa7537d 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -100,11 +100,11 @@ class ModuleCensor : public Module delete Conf; } - virtual void ReplaceLine(std::string &text,std::string pattern, std::string replace) + virtual void ReplaceLine(irc::string &text, irc::string pattern, irc::string replace) { if ((pattern != "") && (text != "")) { - while (text.find(pattern) != std::string::npos) + while (text.find(pattern) != irc::string::npos) { int pos = text.find(pattern); text.erase(pos,pattern.length()); @@ -122,7 +122,7 @@ class ModuleCensor : public Module for (int index = 0; index < MyConf->Enumerate("badword"); index++) { irc::string pattern = (MyConf->ReadValue("badword","text",index)).c_str(); - if (text2.find(pattern) != std::string::npos) + if (text2.find(pattern) != irc::string::npos) { std::string replace = MyConf->ReadValue("badword","replace",index); @@ -139,7 +139,9 @@ class ModuleCensor : public Module if (active) { - this->ReplaceLine(text,std::string(pattern.c_str()),replace); + irc::string x = text.c_str(); + this->ReplaceLine(x,pattern,irc::string(replace.c_str())); + text = x.c_str(); } } } diff --git a/src/svn-rev.sh b/src/svn-rev.sh index 788b18b43..6e8fa9622 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -echo 3441 +echo 3443 |