+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE
+ {
+ if (chan && chan->IsModeSet(oc) && !user->IsOper())
+ {
+ user->WriteNumeric(ERR_CANTJOINOPERSONLY, chan->name, InspIRCd::Format("Only IRC operators may join %s (+O is set)", chan->name.c_str()));
+ return MOD_RES_DENY;
+ }
+ return MOD_RES_PASSTHRU;
+ }