summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-13 18:23:12 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-13 18:23:12 +0200
commita8c7c85ecdb0449f35d5bb4037a61f461e9c4be0 (patch)
tree3bffcd0e389bcbfc7ef333fba04e8090c3ddd76d /src
parente2dd99fa342b45364590ec72746e3118f1779538 (diff)
m_censor Fix possible incorrect cast of dest
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_censor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 50c8e22a7..65b965df2 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -101,7 +101,7 @@ class ModuleCensor : public Module
{
if (index->second.empty())
{
- user->WriteNumeric(ERR_WORDFILTERED, "%s %s %s :Your message contained a censored word, and was blocked", user->nick.c_str(), ((Channel*)dest)->name.c_str(), index->first.c_str());
+ user->WriteNumeric(ERR_WORDFILTERED, "%s %s %s :Your message contained a censored word, and was blocked", user->nick.c_str(), ((target_type == TYPE_CHANNEL) ? ((Channel*)dest)->name.c_str() : ((User*)dest)->nick.c_str()), index->first.c_str());
return MOD_RES_DENY;
}