@@ -75,11+58,11 @@ class ModuleCensor : public Module
bool active = false;
if (target_type == TYPE_USER)
bool active = false;
if (target_type == TYPE_USER)
- active = ((User*)dest)->IsModeSet('G');
+ active = ((User*)dest)->IsModeSet(cu);
else if (target_type == TYPE_CHANNEL)
{
else if (target_type == TYPE_CHANNEL)
{
- active = ((Channel*)dest)->IsModeSet('G');
Channel* c = (Channel*)dest;
Channel* c = (Channel*)dest;
+ active = c->IsModeSet(cc);
ModResult res = ServerInstance->OnCheckExemption(user,c,"censor");
if (res == MOD_RES_ALLOW)
ModResult res = ServerInstance->OnCheckExemption(user,c,"censor");
if (res == MOD_RES_ALLOW)
@@ -96,7+79,7 @@ class ModuleCensor : public Module
{
if (index->second.empty())
{
{
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 :Your message contained a censored word, and was blocked", ((Channel*)dest)->name.c_str(), index->first.c_str());
return MOD_RES_DENY;
}
return MOD_RES_DENY;
}
@@ -107,12+90,7 @@ class ModuleCensor : public Module