+ std::string oldreason(partmessage);
+ partmessage = "Reason filtered";
+ if (!notifyuser)
+ {
+ // Send fake part
+ ClientProtocol::Messages::Part partmsg(memb, oldreason);
+ ClientProtocol::Event ev(ServerInstance->GetRFCEvents().part, partmsg);
+ luser->Send(ev);
+
+ // Don't send the user the changed message
+ except_list.insert(user);
+ return;
+ }
+
+ if (hidemask)
+ user->WriteNumeric(Numerics::CannotSendTo(chan, "Your part message contained a banned phrase and was blocked."));
+ else
+ user->WriteNumeric(Numerics::CannotSendTo(chan, InspIRCd::Format("Your part message contained a banned phrase (%s) and was blocked.",
+ match->mask.c_str())));
+ }