Add a setting to automatically decline and leave incoming conferences
Look under Communication preferences for "Block incoming conference chats" to activate.
This commit is contained in:
@@ -651,6 +651,17 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>LiruBlockConferences</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>When true, new incoming conference chats will not be opened.</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
<key>LiruContinueFlyingOnUnsit</key>
|
<key>LiruContinueFlyingOnUnsit</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -448,8 +448,8 @@ void LLIMMgr::addMessage(
|
|||||||
// create IM window as necessary
|
// create IM window as necessary
|
||||||
if(!floater)
|
if(!floater)
|
||||||
{
|
{
|
||||||
// Return now if we're blocking this group's chat
|
// Return now if we're blocking this group's chat or conferences
|
||||||
if (getIgnoreGroup(session_id) && gAgent.isInGroup(session_id))
|
if (gAgent.isInGroup(session_id) ? getIgnoreGroup(session_id) : dialog != IM_NOTHING_SPECIAL && dialog != IM_SESSION_P2P_INVITE && gSavedSettings.getBOOL("LiruBlockConferences"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string name = (session_name.size() > 1) ? session_name : from;
|
std::string name = (session_name.size() > 1) ? session_name : from;
|
||||||
@@ -1423,6 +1423,17 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void leave_group_chat(const LLUUID& from_id, const LLUUID& session_id)
|
||||||
|
{
|
||||||
|
// Tell the server we've left group chat
|
||||||
|
std::string name;
|
||||||
|
gAgent.buildFullname(name);
|
||||||
|
pack_instant_message(gMessageSystem, gAgentID, false, gAgentSessionID, from_id,
|
||||||
|
name, LLStringUtil::null, IM_ONLINE, IM_SESSION_LEAVE, session_id);
|
||||||
|
gAgent.sendReliableMessage();
|
||||||
|
gIMMgr->removeSession(session_id);
|
||||||
|
}
|
||||||
|
|
||||||
class LLViewerChatterBoxInvitation : public LLHTTPNode
|
class LLViewerChatterBoxInvitation : public LLHTTPNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -1535,13 +1546,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (gIMMgr->getIgnoreGroup(session_id))
|
if (gIMMgr->getIgnoreGroup(session_id))
|
||||||
{
|
{
|
||||||
// Tell the server we've left group chat
|
leave_group_chat(from_id, session_id);
|
||||||
std::string name;
|
|
||||||
gAgent.buildFullname(name);
|
|
||||||
pack_instant_message(gMessageSystem, gAgentID, false, gAgent.getSessionID(), from_id,
|
|
||||||
name, LLStringUtil::null, IM_ONLINE, IM_SESSION_LEAVE, session_id);
|
|
||||||
gAgent.sendReliableMessage();
|
|
||||||
gIMMgr->removeSession(session_id);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"))
|
else if (gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"))
|
||||||
@@ -1555,6 +1560,11 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (from_id != session_id && gSavedSettings.getBOOL("LiruBlockConferences")) // from and session are equal for IMs only.
|
||||||
|
{
|
||||||
|
leave_group_chat(from_id, session_id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
prepend_msg = std::string("IM: ");
|
prepend_msg = std::string("IM: ");
|
||||||
}
|
}
|
||||||
chat.mText = prepend_msg + name + separator_string + saved + message.substr(message_offset);
|
chat.mText = prepend_msg + name + separator_string + saved + message.substr(message_offset);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<check_box bottom="-65" height="16" initial_value="false" label="Include IM in chat console" name="include_im_in_chat_console"/>
|
<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="-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 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="-218" height="10" left="12" name="text_box4">Logging Options:</text>
|
<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="-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"/>
|
<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