diff options
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c110e0d815..dffd523b02 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -48,6 +48,7 @@ #include "llspeakers.h" //for LLIMSpeakerMgr #include "lltrans.h" #include "llfloaterreg.h" +#include "llfloaterreporter.h" #include "llfloatersidepanelcontainer.h" #include "llmutelist.h" #include "llstylemap.h" @@ -403,6 +404,10 @@ public: { LLAvatarActions::pay(getAvatarId()); } + else if (level == "report_abuse") + { + LLFloaterReporter::showFromChat(mAvatarID, mFrom, getChild<LLTextBox>("time_box")->getValue().asString(), mText); + } else if(level == "block_unblock") { LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagVoiceChat); @@ -477,6 +482,10 @@ public: { return canModerate(userdata); } + else if (level == "report_abuse") + { + return gAgentID != mAvatarID; + } else if (level == "can_ban_member") { return canBanGroupMember(getAvatarId()); @@ -628,6 +637,11 @@ public: mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; + // To be able to report a message, we need a copy of it's text + // and it's easier to store text directly than trying to get + // it from a lltextsegment or chat's mEditor + mText = chat.mText; + //*TODO overly defensive thing, source type should be maintained out there if((chat.mFromID.isNull() && chat.mFromName.empty()) || (chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull())) { @@ -977,6 +991,7 @@ protected: EChatSourceType mSourceType; std::string mFrom; LLUUID mSessionID; + std::string mText; S32 mMinUserNameWidth; const LLFontGL* mUserNameFont; |