- ModResult OnWhoisLine(User* user, User* dest, int &numeric, std::string &text) CXX11_OVERRIDE
+ void OnUserQuit(User* user, const std::string&, const std::string&) CXX11_OVERRIDE
+ {
+ if (user->IsModeSet(hm))
+ hm.opercount--;
+ }
+
+ ModResult OnNumeric(User* user, const Numeric::Numeric& numeric) CXX11_OVERRIDE
+ {
+ if (numeric.GetNumeric() != RPL_LUSEROP || active || user->HasPrivPermission("users/auspex"))
+ return MOD_RES_PASSTHRU;
+
+ // If there are no visible operators then we shouldn't send the numeric.
+ size_t opercount = ServerInstance->Users->all_opers.size() - hm.opercount;
+ if (opercount)
+ {
+ active = true;
+ user->WriteNumeric(RPL_LUSEROP, opercount, "operator(s) online");
+ active = false;
+ }
+ return MOD_RES_DENY;
+ }
+
+ ModResult OnWhoisLine(Whois::Context& whois, Numeric::Numeric& numeric) CXX11_OVERRIDE