summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-15 18:56:25 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-15 18:56:25 +0200
commit91e8b4bc64ef296893b6a72cc57a3ae8a5d49d03 (patch)
treec7a5dfbcfa87ac6b6578a057e4e4746bdd58c555 /indra/newview/llnearbychathandler.cpp
parent17a72e5e51cae48c7cd6f7f3dda06c895dd482c8 (diff)
parentb21fca13e6bea9420f80a35163d25a33b929bbd1 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 9e13a626b4..96442fafcc 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -180,6 +180,11 @@ 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();
@@ -302,7 +307,6 @@ 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()
@@ -332,25 +336,22 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
- 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);
- }
-
+ LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
{
//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())
{