Force replacing registered urls everywhere that's not from another user

I think I covered all my bases:
Local Chat, IMs/Group/Conference Chats
Script Dialogs
Group Notices

There are a few others maybe, like notifications EMs can spawn but if
those are intentionally tricking people, grid owners should be informed.
This commit is contained in:
Lirusaito
2019-02-09 16:50:38 -05:00
parent 90285944d9
commit 2493c401f9
6 changed files with 19 additions and 20 deletions

View File

@@ -217,14 +217,14 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
line = line.substr(chat.mFromName.length());
LLStyleSP sourceStyle = LLStyleMap::instance().lookup(chat.mFromID, chat.mURL);
sourceStyle->mItalic = is_irc;
edit->appendText(chat.mFromName, false, prepend_newline, sourceStyle);
edit->appendText(chat.mFromName, false, prepend_newline, sourceStyle, false);
prepend_newline = false;
}
LLStyleSP style(new LLStyle);
style->setColor(color);
style->mItalic = is_irc;
style->mBold = chat.mChatType == CHAT_TYPE_SHOUT;
edit->appendText(line, false, prepend_newline, style);
edit->appendText(line, false, prepend_newline, style, false);
}
void log_chat_text(const LLChat& chat)

View File

@@ -175,11 +175,12 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject,
static const LLStyleSP headerstyle(new LLStyle(true,LLColor4::black,"SansSerifBig"));
static const LLStyleSP datestyle(new LLStyle(true,LLColor4::black,"serif"));
static const LLStyleSP msgstyle(new LLStyle(true, LLColor4::grey4, LLStringUtil::null));
text->appendText(subject + '\n',false,false,headerstyle);
text->appendText(subject + '\n',false,false,headerstyle,false);
text->appendText(time_buf,false,false,datestyle);
text->appendColoredText(std::string(" \n\n") + message,false,false,LLColor4::grey4);
text->appendText(time_buf,false,false,datestyle,false);
text->appendText(std::string(" \n\n") + message,false,false,msgstyle,false);
LLColor4 semi_transparent(1.0f,1.0f,1.0f,0.8f);
text->setCursor(0,0);

View File

@@ -804,7 +804,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
// Convert the name to a hotlink and add to message.
LLStyleSP source_style = LLStyleMap::instance().lookupAgent(source);
source_style->mItalic = is_irc;
mHistoryEditor->appendText(show_name,false,prepend_newline,source_style);
mHistoryEditor->appendText(show_name,false,prepend_newline,source_style, false);
}
prepend_newline = false;
}
@@ -815,7 +815,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
style->setColor(incolor);
style->mItalic = is_irc;
style->mBold = from_user && gSavedSettings.getBOOL("SingularityBoldGroupModerator") && isModerator(source);
mHistoryEditor->appendText(utf8msg, false, prepend_newline, style);
mHistoryEditor->appendText(utf8msg, false, prepend_newline, style, false);
}
if (log_to_file

View File

@@ -249,7 +249,7 @@ LLNotifyBox::LLNotifyBox(LLNotificationPtr notification)
if (!mIsCaution) // We could do some extra color math here to determine if bg's too close to link color, but let's just cross with the link color instead
text->setLinkColor(new LLColor4(lerp(text_color, gSavedSettings.getColor4("HTMLLinkColor"), 0.4)));
text->setTabStop(FALSE); // can't tab to it (may be a problem for scrolling via keyboard)
text->setText(message); // Now we can set the text, since colors have been set.
text->appendText(message,false,false,nullptr,!layout_script_dialog); // Now we can set the text, since colors have been set.
addChild(text);
}