void notify_automute_callback(const LLUUID& agent_id, const std::string& first_name, const std::string& last_name, BOOL is_group, void* user_data) { U32 temp_data = (U32) (uintptr_t) user_data; LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data; LLUIString auto_message; switch (reason) { default: case LLMuteList::AR_IM: auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByIM"); break; case LLMuteList::AR_INVENTORY: auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByInventory"); break; case LLMuteList::AR_MONEY: auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByMoney"); break; } auto_message.setArg("[FIRST]", first_name); auto_message.setArg("[LAST]", last_name); if (reason == LLMuteList::AR_IM) { LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id); if (timp) { timp->addHistoryLine(auto_message.getString()); } } LLChat auto_chat(auto_message.getString()); LLFloaterChat::addChat(auto_chat, FALSE, FALSE); }
void notify_automute_callback(const LLUUID& agent_id, const std::string& first_name, const std::string& last_name, BOOL is_group, void* user_data) { U32 temp_data = (U32) (uintptr_t) user_data; LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data; std::string notif_name; switch (reason) { default: case LLMuteList::AR_IM: notif_name = "AutoUnmuteByIM"; break; case LLMuteList::AR_INVENTORY: notif_name = "AutoUnmuteByInventory"; break; case LLMuteList::AR_MONEY: notif_name = "AutoUnmuteByMoney"; break; } LLSD args; args["FIRST"] = first_name; args["LAST"] = last_name; LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args); if (notif_ptr) { std::string message = notif_ptr->getMessage(); if (reason == LLMuteList::AR_IM) { LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id); if (timp) { timp->addHistoryLine(message); } } LLChat auto_chat(message); LLFloaterChat::addChat(auto_chat, FALSE, FALSE); } }
void notify_automute_callback(const LLUUID& agent_id, const std::string& full_name, bool is_group, LLMuteList::EAutoReason reason) { std::string notif_name; switch (reason) { default: case LLMuteList::AR_IM: notif_name = "AutoUnmuteByIM"; break; case LLMuteList::AR_INVENTORY: notif_name = "AutoUnmuteByInventory"; break; case LLMuteList::AR_MONEY: notif_name = "AutoUnmuteByMoney"; break; } LLSD args; args["NAME"] = full_name; LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args); if (notif_ptr) { std::string message = notif_ptr->getMessage(); if (reason == LLMuteList::AR_IM) { LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id); if (timp) { timp->addHistoryLine(message); } } LLChat auto_chat(message); LLFloaterChat::addChat(auto_chat, FALSE, FALSE); } }