diff options
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 96442fafcc..9e13a626b4 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -180,11 +180,6 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) if(panel && panel->messageID() == fromID && panel->canAddText()) { - if (CHAT_STYLE_IRC == notification["chat_style"].asInteger()) - { - notification["message"] = notification["from"].asString() + notification["message"].asString(); - } - panel->addMessage(notification); toast->reshapeToPanel(); toast->resetTimer(); @@ -307,6 +302,7 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i channel->setCreatePanelCallback(callback); mChannel = LLChannelManager::getInstance()->addChannel(channel); + mChannel->setOverflowFormatString("You have %d unread nearby chat messages"); } LLNearbyChatHandler::~LLNearbyChatHandler() @@ -336,22 +332,25 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) LLChat& tmp_chat = const_cast<LLChat&>(chat_msg); - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); + if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) + { + if(!tmp_chat.mFromName.empty()) + tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3); + else + tmp_chat.mText = tmp_chat.mText.substr(3); + } + { //sometimes its usefull to have no name at all... //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) // tmp_chat.mFromName = tmp_chat.mFromID.asString(); } + + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); nearby_chat->addMessage(chat_msg); if(nearby_chat->getVisible()) return;//no need in toast if chat is visible - - // Handle irc styled messages for toast panel - if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) - { - tmp_chat.mText = tmp_chat.mText.substr(3); - } - + // arrange a channel on a screen if(!mChannel->getVisible()) { |