]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_censor.cpp
m_spanningtree Allow multiple valid ips for link blocks as a result of SecurityIPResolver
[user/henk/code/inspircd.git] / src / modules / m_censor.cpp
index 7d8c74024a8f0b5a5a877d6dcdabdbef0b0bb871..d2a60275a8705ee43c101ee90fc9644a70e045cd 100644 (file)
@@ -79,11 +79,11 @@ class ModuleCensor : public Module
                        {
                                if (index->second.empty())
                                {
-                                       user->WriteNumeric(ERR_WORDFILTERED, ((Channel*)dest)->name, index->first, "Your message contained a censored word, and was blocked");
+                                       user->WriteNumeric(ERR_WORDFILTERED, ((target_type == TYPE_CHANNEL) ? ((Channel*)dest)->name : ((User*)dest)->nick), index->first.c_str(), "Your message contained a censored word, and was blocked");
                                        return MOD_RES_DENY;
                                }
 
-                               SearchAndReplace(text2, index->first, index->second);
+                               stdalgo::string::replace_all(text2, index->first, index->second);
                        }
                }
                text = text2.c_str();