本文整理汇总了C++中ircv3::monitor::Manager类的典型用法代码示例。如果您正苦于以下问题:C++ Manager类的具体用法?C++ Manager怎么用?C++ Manager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Manager类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnUserQuit
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);
}
示例2: OnUserQuit
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);
}
示例3: SendAlert
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);
}
}
示例4: SendAlert
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);
}
}