]> 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 170fe8b07932d4d88591f1960d61dcd293a50b36..bbf061f7ea3cd6ec719959e2d3e09e4321377ba3 100644 (file)
@@ -20,6 +20,8 @@
  */
 
 
+/* $ModDesc: Provides user and channel +G mode */
+
 #define _CRT_SECURE_NO_DEPRECATE
 #define _SCL_SECURE_NO_DEPRECATE
 
@@ -28,8 +30,6 @@
 
 typedef std::map<irc::string,irc::string> censor_t;
 
-/* $ModDesc: Provides user and channel +G mode */
-
 /** Handles usermode +G
  */
 class CensorUser : public SimpleUserModeHandler
@@ -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());
                }
        }