Separate busy response block from autoresponse, and use busy_message() function to avoid duplicate code
This commit is contained in:
@@ -2225,8 +2225,36 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
|
// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
|
||||||
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||||
else if (offline == IM_ONLINE && !is_linden && (is_busy || is_autorespond || is_autorespond_nonfriends || is_autorespond_muted) && name != SYSTEM_FROM && gRlvHandler.canReceiveIM(from_id))
|
else if (offline == IM_ONLINE && !is_linden && is_busy && !is_muted && name != SYSTEM_FROM && gRlvHandler.canReceiveIM(from_id))
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
{
|
||||||
|
// now store incoming IM in chat history
|
||||||
|
buffer = separator_string + message.substr(message_offset);
|
||||||
|
|
||||||
|
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
|
||||||
|
// add to IM panel, but do not bother the user
|
||||||
|
gIMMgr->addMessage(
|
||||||
|
session_id,
|
||||||
|
from_id,
|
||||||
|
name,
|
||||||
|
buffer,
|
||||||
|
LLStringUtil::null,
|
||||||
|
dialog,
|
||||||
|
parent_estate_id,
|
||||||
|
region_id,
|
||||||
|
position,
|
||||||
|
true);
|
||||||
|
|
||||||
|
// pretend this is chat generated by self, so it does not show up on screen
|
||||||
|
chat.mText = std::string("IM: ") + name + separator_string + message.substr(message_offset);
|
||||||
|
LLFloaterChat::addChat(chat, true, true);
|
||||||
|
if (!gIMMgr->hasSession(session_id) || gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat"))
|
||||||
|
busy_message(msg, from_id);
|
||||||
|
}
|
||||||
|
// else if (offline == IM_ONLINE && !is_linden && (is_autorespond || is_autorespond_nonfriends || is_autorespond_muted) && name != SYSTEM_FROM)
|
||||||
|
// [RLVa:LF] - Same as above: Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||||
|
else if (offline == IM_ONLINE && !is_linden && (is_autorespond || is_autorespond_nonfriends || is_autorespond_muted) && name != SYSTEM_FROM && gRlvHandler.canReceiveIM(from_id))
|
||||||
|
// [/RLVa:LF]
|
||||||
{
|
{
|
||||||
// now store incoming IM in chat history
|
// now store incoming IM in chat history
|
||||||
|
|
||||||
@@ -2270,13 +2298,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseMutedItemID"));
|
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseMutedItemID"));
|
||||||
// We don't show that we've responded to mutes
|
// We don't show that we've responded to mutes
|
||||||
}
|
}
|
||||||
else if (is_busy)
|
|
||||||
{
|
|
||||||
response = gSavedPerAccountSettings.getString("BusyModeResponse");
|
|
||||||
if (gSavedPerAccountSettings.getBOOL("BusyModeResponseItem"))
|
|
||||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("BusyModeResponseItemID"));
|
|
||||||
show_autoresponded = gSavedPerAccountSettings.getBOOL("BusyModeResponseShow");
|
|
||||||
}
|
|
||||||
else if (is_autorespond_nonfriends)
|
else if (is_autorespond_nonfriends)
|
||||||
{
|
{
|
||||||
response = gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage");
|
response = gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage");
|
||||||
|
|||||||
Reference in New Issue
Block a user