summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp52
1 files changed, 30 insertions, 22 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 5fc5be1075..348206bd30 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -187,7 +187,7 @@ void accept_friendship_coro(std::string url, LLSD notification)
}
else
{
- if (!result.has("success") || result["success"].asBoolean() == false)
+ if (!result.has("success") || !result["success"].asBoolean())
{
LL_WARNS("Friendship") << "Server failed to process accepted friendship. " << httpResults << LL_ENDL;
}
@@ -230,7 +230,7 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option)
}
else
{
- if (!result.has("success") || result["success"].asBoolean() == false)
+ if (!result.has("success") || !result["success"].asBoolean())
{
LL_WARNS("Friendship") << "Server failed to process declined friendship. " << httpResults << LL_ENDL;
}
@@ -274,7 +274,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
// This will also trigger an onlinenotification if the user is online
std::string url = gAgent.getRegionCapability("AcceptFriendship");
LL_DEBUGS("Friendship") << "Cap string: " << url << LL_ENDL;
- if (!url.empty() && payload.has("online") && payload["online"].asBoolean() == false)
+ if (!url.empty() && payload.has("online") && !payload["online"].asBoolean())
{
LL_DEBUGS("Friendship") << "Accepting friendship via capability" << LL_ENDL;
LLCoros::instance().launch("LLMessageSystem::acceptFriendshipOffer",
@@ -314,7 +314,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
// the rejection to the simulator to delete the pending userop.
std::string url = gAgent.getRegionCapability("DeclineFriendship");
LL_DEBUGS("Friendship") << "Cap string: " << url << LL_ENDL;
- if (!url.empty() && payload.has("online") && payload["online"].asBoolean() == false)
+ if (!url.empty() && payload.has("online") && !payload["online"].asBoolean())
{
LL_DEBUGS("Friendship") << "Declining friendship via capability" << LL_ENDL;
LLCoros::instance().launch("LLMessageSystem::declineFriendshipOffer",
@@ -774,7 +774,7 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif
}
else
{
- if (!result.has("success") || result["success"].asBoolean() == false)
+ if (!result.has("success") || !result["success"].asBoolean())
{
LL_WARNS("GroupInvite") << "Server failed to process group " << group_id << " invitation response. " << httpResults << LL_ENDL;
}
@@ -2041,25 +2041,29 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
std::string from_string; // Used in the pop-up.
std::string chatHistory_string; // Used in chat history.
- if (mFromObject == true)
+ if (mFromObject)
{
+ std::string quot = LLTrans::getString("'");
if (mFromGroup)
{
std::string group_name;
if (gCacheName->getGroupName(mFromID, group_name))
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'"
- + mFromName + LLTrans::getString("'") +" " + LLTrans::getString("InvOfferOwnedByGroup")
- + " "+ "'" + group_name + "'";
-
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByGroup")
- + " " + group_name + "'";
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedByGroup") + " " +
+ quot + group_name + quot;
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedByGroup") + " " +
+ quot + group_name + quot;
}
else
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'"
- + mFromName +"'"+ " " + LLTrans::getString("InvOfferOwnedByUnknownGroup");
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownGroup");
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownGroup");
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownGroup");
}
}
else
@@ -2067,15 +2071,19 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
LLAvatarName av_name;
if (LLAvatarNameCache::get(mFromID, &av_name))
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName
- + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + av_name.getUserName();
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName();
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName();
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName();
}
else
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+LLTrans::getString("'")
- + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedByUnknownUser");
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownUser");
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownUser");
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownUser");
}
}
}
@@ -2083,7 +2091,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
{
from_string = chatHistory_string = mFromName;
}
-
+
LLUUID destination;
bool accept = true;