From a8c7c85ecdb0449f35d5bb4037a61f461e9c4be0 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 13 Aug 2016 18:23:12 +0200 Subject: m_censor Fix possible incorrect cast of dest --- src/modules/m_censor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3