Applied patch from Ansariel Hiller for FIRE-1032, add ability to block group chat
parent
f052156959
commit
e1066181d2
|
|
@ -2,6 +2,28 @@
|
|||
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="llsd.xsd">
|
||||
<map>
|
||||
<key>PhoenixMuteAllGroups</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Disable ALL group chats.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>PhoenixMuteGroupWhenNoticesDisabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When 'Receive group notices' is disabled, disable group chat as well.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>RadarAlertChannel</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -2447,6 +2447,14 @@ void LLAgent::handleMaturity(const LLSD& newvalue)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void LLAgent::buildFullname(std::string& name) const
|
||||
{
|
||||
if (gAgentAvatarp)
|
||||
{
|
||||
name = gAgentAvatarp->getFullname();
|
||||
}
|
||||
}
|
||||
|
||||
//*TODO remove, is not used anywhere as of August 20, 2009
|
||||
void LLAgent::buildFullnameAndTitle(std::string& name) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ public:
|
|||
//--------------------------------------------------------------------
|
||||
public:
|
||||
//*TODO remove, is not used as of August 20, 2009
|
||||
void buildFullname(std::string& name) const;
|
||||
void buildFullnameAndTitle(std::string &name) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3327,6 +3327,39 @@ public:
|
|||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Mute group chat port from Phoenix
|
||||
BOOL PhoenixMuteAllGroups = gSavedSettings.getBOOL("PhoenixMuteAllGroups");
|
||||
BOOL PhoenixMuteGroupWhenNoticesDisabled = gSavedSettings.getBOOL("PhoenixMuteGroupWhenNoticesDisabled");
|
||||
LLGroupData group_data;
|
||||
if (gAgent.getGroupData(session_id, group_data))
|
||||
{
|
||||
if (PhoenixMuteAllGroups || (PhoenixMuteGroupWhenNoticesDisabled && !group_data.mAcceptNotices))
|
||||
{
|
||||
llinfos << "Firestorm: muting group chat: " << group_data.mName << LL_ENDL;
|
||||
|
||||
//KC: make sure we leave the group chat at the server end as well
|
||||
std::string aname;
|
||||
gAgent.buildFullname(aname);
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
gAgent.getID(),
|
||||
FALSE,
|
||||
gAgent.getSessionID(),
|
||||
from_id,
|
||||
aname,
|
||||
LLStringUtil::null,
|
||||
IM_ONLINE,
|
||||
IM_SESSION_LEAVE,
|
||||
session_id);
|
||||
gAgent.sendReliableMessage();
|
||||
//gIMMgr->removeSession(session_id);
|
||||
gIMMgr->leaveSession(session_id);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
// END: Mute group chat port from Phoenix
|
||||
|
||||
// standard message, not from system
|
||||
std::string saved;
|
||||
if(offline == IM_OFFLINE)
|
||||
|
|
|
|||
|
|
@ -508,6 +508,24 @@
|
|||
height="20"
|
||||
control_name="PhoenixBoldGroupMods"
|
||||
label="Show group moderator messages in bold"/>
|
||||
<check_box
|
||||
layout="topleft"
|
||||
follows="left|top"
|
||||
top_delta="20"
|
||||
left="20"
|
||||
width="50"
|
||||
height="20"
|
||||
control_name="PhoenixMuteAllGroups"
|
||||
label="Disable ALL group chats"/>
|
||||
<check_box
|
||||
layout="topleft"
|
||||
follows="left|top"
|
||||
top_delta="20"
|
||||
left="20"
|
||||
width="50"
|
||||
height="20"
|
||||
control_name="PhoenixMuteGroupWhenNoticesDisabled"
|
||||
label="When 'Receive group notices' is disabled, disable group chat as well"/>
|
||||
|
||||
</panel>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue