aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_censor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_censor.cpp')
-rw-r--r--src/modules/m_censor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 5e832cc8b..bbf061f7e 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -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());
}
}