void UserConnection::pm(const string& message, bool thirdPerson) { AdcCommand c(AdcCommand::CMD_MSG); c.addParam(message); if (thirdPerson) c.addParam("ME", "1"); send(c); // simulate an echo message. callAsync([=]{ handlePM(c, true); }); }
void UserConnection::pm(const string& message, bool thirdPerson) { { auto lock = ClientManager::getInstance()->lock(); auto ou = ClientManager::getInstance()->findOnlineUser(getHintedUser()); if(PluginManager::getInstance()->runHook(HOOK_CHAT_PM_OUT, ou, message)) return; } AdcCommand c(AdcCommand::CMD_MSG); c.addParam(message); if(thirdPerson) c.addParam("ME", "1"); send(c); // simulate an echo message. handlePM(c, true); }
void UserConnection::handle(AdcCommand::MSG t, const AdcCommand& c) { handlePM(c, false); fire(t, this, c); }