- if (mlock_str->find(*modes) != std::string::npos)
- {
- source->WriteNumeric(742, "%s %c %s :MODE cannot be set due to channel having an active MLOCK restriction policy",
- channel->name.c_str(), *modes, mlock_str->c_str());
- return MOD_RES_DENY;
- }
+ source->WriteNumeric(ERR_MLOCKRESTRICTED, channel->name, mode, *mlock_str, "MODE cannot be set due to the channel having an active MLOCK restriction policy");
+ return MOD_RES_DENY;