+ ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string& privs, const std::string& keygiven)
+ {
+ /* The user may have the +H umode on himself, but +H does not necessarily correspond
+ * to the +H of m_hideoper.
+ * However we only add the modewatcher when m_hideoper is loaded, so these
+ * conditions (mw_added and the user being +H) together mean the user is a hidden oper.
+ */
+
+ if (IS_OPER(user) && (!mw_added || !user->IsModeSet('H')))
+ privs.push_back('y');
+ return MOD_RES_PASSTHRU;
+ }
+
+ void SetOperPrefix(User* user, bool add)