void OnUserQuit(User* user, const std::string& message, const std::string& oper_message) override { LocalUser* localuser = IS_LOCAL(user); if (localuser) manager.UnwatchAll(localuser); Offline(user, user->nick); }
void OnUserQuit(User* user, const std::string& message, const std::string& oper_message) override { LocalUser* localuser = IS_LOCAL(user); if (localuser) manager.UnwatchAll(localuser); SendAlert(RPL_MONOFFLINE, user->nick); }
void SendAlert(unsigned int numeric, const std::string& nick) { const IRCv3::Monitor::WatcherList* list = manager.GetWatcherList(nick); if (!list) return; for (IRCv3::Monitor::WatcherList::const_iterator i = list->begin(); i != list->end(); ++i) { LocalUser* curr = *i; curr->WriteNumeric(numeric, nick); } }
void SendAlert(User* user, const std::string& nick, unsigned int numeric, const char* numerictext, time_t shownts) { const IRCv3::Monitor::WatcherList* list = manager.GetWatcherList(nick); if (!list) return; Numeric::Numeric num(numeric); num.push(nick).push(user->ident).push(user->GetDisplayedHost()).push(ConvToStr(shownts)).push(numerictext); for (IRCv3::Monitor::WatcherList::const_iterator i = list->begin(); i != list->end(); ++i) { LocalUser* curr = *i; curr->WriteNumeric(num); } }