Skip to content

Commit

Permalink
m_censor Fix possible incorrect cast of dest
Browse files Browse the repository at this point in the history
  • Loading branch information
attilamolnar committed Aug 13, 2016
1 parent e2dd99f commit a8c7c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/m_censor.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit a8c7c85

Please sign in to comment.