@@ -136,9+138,16 @@ class ModuleCensor : public Module
bool active = false;
if (target_type == TYPE_USER)
bool active = false;
if (target_type == TYPE_USER)
- active = ((userrec*)dest)->IsModeSet('G');
+ active = ((User*)dest)->IsModeSet('G');
else if (target_type == TYPE_CHANNEL)
else if (target_type == TYPE_CHANNEL)
- active = ((chanrec*)dest)->IsModeSet('G');
+ {
+ active = ((Channel*)dest)->IsModeSet('G');
+ Channel* c = (Channel*)dest;
+ if (CHANOPS_EXEMPT(ServerInstance, 'G') && c->GetStatus(user) == STATUS_OP)
+ {
+ return 0;
+ }
+ }
if (!active)
return 0;
if (!active)
return 0;
@@ -150,7+159,7 @@ class ModuleCensor : public Module
{
if (index->second.empty())
{
{
if (index->second.empty())
{
- user->WriteServ("936 %s %s %s :Your message contained a censored word, and was blocked", user->nick, ((chanrec*)dest)->name, index->first.c_str());
+ user->WriteNumeric(936, "%s %s %s :Your message contained a censored word, and was blocked", user->nick, ((Channel*)dest)->name, index->first.c_str());