]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_censor.cpp
m_spanningtree SVSNICK needs 3 parameters
[user/henk/code/inspircd.git] / src / modules / m_censor.cpp
index 5e832cc8b6007e12c6197d91ebd97c45caefe355..bbf061f7ea3cd6ec719959e2d3e09e4321377ba3 100644 (file)
@@ -128,9 +128,10 @@ class ModuleCensor : public Module
 
                for (int index = 0; index < MyConf.Enumerate("badword"); index++)
                {
-                       irc::string pattern = (MyConf.ReadValue("badword","text",index)).c_str();
-                       irc::string replace = (MyConf.ReadValue("badword","replace",index)).c_str();
-                       censors[pattern] = replace;
+                       std::string str = MyConf.ReadValue("badword","text",index);
+                       irc::string pattern(str.c_str());
+                       str = MyConf.ReadValue("badword","replace",index);
+                       censors[pattern] = irc::string(str.c_str());
                }
        }