+ return MOD_RES_PASSTHRU;
+ }
+
+ ModResult OnCheckBan(User* user, Channel* chan, const std::string& mask) CXX11_OVERRIDE
+ {
+ // Check whether the entry is an extban.
+ if (mask.length() <= 2 || mask[0] != 'O' || mask[1] != ':')
+ return MOD_RES_PASSTHRU;
+
+ // If the user is not an oper they can't match this.
+ if (!user->IsOper())
+ return MOD_RES_PASSTHRU;
+
+ // Check whether the oper's type matches the ban.
+ const std::string submask = mask.substr(2);
+ if (InspIRCd::Match(user->oper->name, submask))
+ return MOD_RES_DENY;
+
+ // If the oper's type contains spaces recheck with underscores.
+ std::string opername(user->oper->name);
+ stdalgo::string::replace_all(opername, space, underscore);
+ if (InspIRCd::Match(opername, submask))
+ return MOD_RES_DENY;
+
+ return MOD_RES_PASSTHRU;