Commit fddd851a authored by Testicular Slingshot's avatar Testicular Slingshot
Browse files

Some fixes and changes thanks to @Liru

parent e3d61ddd
......@@ -70,7 +70,7 @@
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
std::string replace_wildcard(std::string input, const LLUUID& id, const std::string& name)
std::string replace_wildcards(std::string input, const LLUUID& id, const std::string& name)
{
boost::algorithm::replace_all(input, "#n", name);
// disable boost::lexical_cast warning
......@@ -171,11 +171,11 @@ void translate_if_needed(std::string& message)
}
}
class LLPostponedIMSystemTipNotification : public LLPostponedNotification
class LLPostponedIMSystemTipNotification final : public LLPostponedNotification
{
protected:
/* virtual */
void modifyNotificationParams()
void modifyNotificationParams() override
{
LLSD payload = mParams.payload;
payload["SESSION_NAME"] = mName;
......@@ -183,11 +183,11 @@ protected:
}
};
class LLPostponedOfferNotification : public LLPostponedNotification
class LLPostponedOfferNotification final : public LLPostponedNotification
{
protected:
/* virtual */
void modifyNotificationParams()
void modifyNotificationParams() override
{
LLSD substitutions = mParams.substitutions;
substitutions["NAME"] = mName;
......@@ -632,7 +632,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
std::string response = gSavedPerAccountSettings.getString(sAutorespondNonFriend && !is_friend
? "AlchemyAutoresponseNotFriend"
: "AlchemyAutoresponse");
response = replace_wildcard(response, from_id, name);
response = replace_wildcards(response, from_id, name);
pack_instant_message(
gMessageSystem,
gAgent.getID(),
......@@ -754,7 +754,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
std::string response = gSavedPerAccountSettings.getString(sAutorespondNonFriend && !is_friend
? "AlchemyAutoresponseNotFriend"
: "AlchemyAutoresponse");
response = replace_wildcard(response, from_id, name);
response = replace_wildcards(response, from_id, name);
pack_instant_message(gMessageSystem,
gAgent.getID(),
FALSE,
......
......@@ -59,5 +59,8 @@ private:
static void requestOfflineMessagesLegacy();
};
// Replace wild cards in message strings
std::string replace_wildcards(std::string input, const LLUUID& id, const std::string& name);
#endif // LL_LLLLIMPROCESSING_H
......@@ -520,20 +520,6 @@ void process_layer_data(LLMessageSystem* mesgsys, void** user_data)
}
}
// Replace wild cards in message strings
std::string replace_wildcards(std::string input, const LLUUID& id, const std::string& name)
{
boost::algorithm::replace_all(input, "#n", name);
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
boost::algorithm::replace_all(input, "#r", slurl.getSLURLString());
LLAvatarName av_name;
boost::algorithm::replace_all(input, "#d", LLAvatarNameCache::get(id, &av_name) ? av_name.getDisplayName() : name);
return input;
}
void process_derez_ack(LLMessageSystem*, void**)
{
if (gViewerWindow) gViewerWindow->getWindow()->decBusyCount();
......@@ -730,6 +716,9 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
notification_adjusted = sSavedGroupInvite[id];
response_adjusted = sSavedResponse[id];
}
// Potential memory leak fix
sSavedGroupInvite.erase(id);
sSavedResponse.erase(id);
}
S32 option = LLNotificationsUtil::getSelectedOption(notification_adjusted, response_adjusted);
......
......@@ -3047,7 +3047,6 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append(CAP_NAME_OBJECT_MEDIA);
capabilityNames.append("ObjectMediaNavigate");
capabilityNames.append("ObjectNavMeshProperties");
capabilityNames.append("OpenSimExtras");
capabilityNames.append("ParcelPropertiesUpdate");
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ProductInfoRequest");
......
......@@ -7563,6 +7563,10 @@ Offer a teleport?
index="1"
name="Decline"
text="Decline"/>
<button
index="2"
name="IM"
text="IM"/>
</form>
</notification>
......@@ -7594,6 +7598,10 @@ Offer a teleport?
index="1"
name="Decline"
text="Decline"/>
<button
index="2"
name="IM"
text="IM"/>
</form>
</notification>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment