Feature Request: Allow blocking conferences from nonfriends exclusively.
Option is in Communication tab, as the old one was. Translators will need to localize this. (panel_preferences_im.xml)
This commit is contained in:
@@ -648,11 +648,11 @@
|
||||
<key>LiruBlockConferences</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When true, new incoming conference chats will not be opened.</string>
|
||||
<string>When not zero, new incoming conference chats will not be opened, if 2 only those from nonfriends will be blocked.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
@@ -107,6 +107,13 @@ LLColor4 agent_chat_color(const LLUUID& id, const std::string& name, bool local_
|
||||
return local_chat ? gSavedSettings.getColor4("AgentChatColor") : gSavedSettings.getColor("IMChatColor");
|
||||
}
|
||||
|
||||
bool block_conference(const LLUUID& id)
|
||||
{
|
||||
const U32 block(gSavedSettings.getU32("LiruBlockConferences"));
|
||||
if (block == 2) return !LLAvatarActions::isFriend(id);
|
||||
return block;
|
||||
}
|
||||
|
||||
|
||||
class LLViewerChatterBoxInvitationAcceptResponder : public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
@@ -451,7 +458,7 @@ void LLIMMgr::addMessage(
|
||||
if(!floater)
|
||||
{
|
||||
// Return now if we're blocking this group's chat or conferences
|
||||
if (gAgent.isInGroup(session_id) ? getIgnoreGroup(session_id) : dialog != IM_NOTHING_SPECIAL && dialog != IM_SESSION_P2P_INVITE && gSavedSettings.getBOOL("LiruBlockConferences"))
|
||||
if (gAgent.isInGroup(session_id) ? getIgnoreGroup(session_id) : dialog != IM_NOTHING_SPECIAL && dialog != IM_SESSION_P2P_INVITE && block_conference(other_participant_id))
|
||||
return;
|
||||
|
||||
std::string name = (session_name.size() > 1) ? session_name : from;
|
||||
@@ -1568,7 +1575,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (from_id != session_id && gSavedSettings.getBOOL("LiruBlockConferences")) // from and session are equal for IMs only.
|
||||
if (from_id != session_id && block_conference(from_id)) // from and session are equal for IMs only.
|
||||
{
|
||||
leave_group_chat(from_id, session_id);
|
||||
return;
|
||||
|
||||
@@ -8,7 +8,12 @@
|
||||
<check_box bottom="-65" height="16" initial_value="false" label="Include IM in chat console" name="include_im_in_chat_console"/>
|
||||
<check_box bottom="-85" height="16" initial_value="false" label="Show timestamps in IM" name="show_timestamps_check"/>
|
||||
<check_box bottom="-105" height="16" initial_value="false" label="Show online Friend notifications" name="friends_online_notify_checkbox"/>
|
||||
<check_box follows="top|left" bottom_delta="-20" height="16" label="Block incoming conference chats" control_name="LiruBlockConferences" name="block_conferences_checkbox"/>
|
||||
<text bottom_delta="-15" follows="top|left" left_delta="4" name="conference_block_text">Incoming conferences:</text>
|
||||
<radio_group follows="top|left" bottom_delta="-21" left_delta="116" height="16" width="350" draw_border="false" control_name="LiruBlockConferences" name="block_conferences_radio">
|
||||
<radio_item bottom_delta="0" name="accept" width="30" value="0">Accept</radio_item>
|
||||
<radio_item bottom_delta="0" left_delta="30" name="friends only" width="44" value="2">Friends Only</radio_item>
|
||||
<radio_item bottom_delta="0" left_delta="44" name="block" width="30" value="1">Block</radio_item>
|
||||
</radio_group>
|
||||
<text bottom="-218" height="10" left="12" name="text_box4">Logging Options:</text>
|
||||
<check_box bottom="-225" height="16" initial_value="false" label="Save a log of IM on my computer" left="148" name="log_instant_messages" />
|
||||
<check_box bottom="-245" height="16" initial_value="false" label="Show timestamps in IM log" left="168" name="log_instant_messages_timestamp"/>
|
||||
|
||||
Reference in New Issue
Block a user