summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmutelist.cpp26
-rw-r--r--indra/newview/llmutelist.h3
-rw-r--r--indra/newview/llparticipantlist.cpp16
-rw-r--r--indra/newview/llvoiceclient.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml7
5 files changed, 55 insertions, 20 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 95094f6b52..7cb192e026 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -145,6 +145,9 @@ std::string LLMute::getDisplayType() const
case GROUP:
return LLTrans::getString("MuteGroup");
break;
+ case EXTERNAL:
+ return LLTrans::getString("MuteExternal");
+ break;
}
}
@@ -303,6 +306,12 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
void LLMuteList::updateAdd(const LLMute& mute)
{
+ // External mutes (e.g. Avaline callers) are local only, don't send them to the server.
+ if (mute.mType == LLMute::EXTERNAL)
+ {
+ return;
+ }
+
// Update the database
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateMuteListEntry);
@@ -390,6 +399,12 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
void LLMuteList::updateRemove(const LLMute& mute)
{
+ // External mutes are not sent to the server anyway, no need to remove them.
+ if (mute.mType == LLMute::EXTERNAL)
+ {
+ return;
+ }
+
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RemoveMuteListEntry);
msg->nextBlockFast(_PREHASH_AgentData);
@@ -573,9 +588,14 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
it != mMutes.end();
++it)
{
- it->mID.toString(id_string);
- const std::string& name = it->mName;
- fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags);
+ // Don't save external mutes as they are not sent to the server and probably won't
+ //be valid next time anyway.
+ if (it->mType != LLMute::EXTERNAL)
+ {
+ it->mID.toString(id_string);
+ const std::string& name = it->mName;
+ fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags);
+ }
}
fclose(fp);
return TRUE;
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index 7cb11e6031..79b556bdbb 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -45,7 +45,8 @@ class LLMute
{
public:
// Legacy mutes are BY_NAME and have null UUID.
- enum EType { BY_NAME = 0, AGENT = 1, OBJECT = 2, GROUP = 3, COUNT = 4 };
+ // EXTERNAL mutes are only processed through an external system (e.g. Voice) and not stored.
+ enum EType { BY_NAME = 0, AGENT = 1, OBJECT = 2, GROUP = 3, EXTERNAL = 4, COUNT = 5 };
// Bits in the mute flags. For backwards compatibility (since any mute list entries that were created before the flags existed
// will have a flags field of 0), some of the flags are "inverted".
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index c3748ca81d..a058548459 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -722,7 +722,21 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata,
name = speakerp->mDisplayName;
- LLMute mute(speaker_id, name, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT);
+ LLMute::EType mute_type;
+ switch (speakerp->mType)
+ {
+ case LLSpeaker::SPEAKER_AGENT:
+ mute_type = LLMute::AGENT;
+ break;
+ case LLSpeaker::SPEAKER_OBJECT:
+ mute_type = LLMute::OBJECT;
+ break;
+ case LLSpeaker::SPEAKER_EXTERNAL:
+ default:
+ mute_type = LLMute::EXTERNAL;
+ break;
+ }
+ LLMute mute(speaker_id, name, mute_type);
if (!is_muted)
{
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 298ce3fcec..542ec16547 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -5143,9 +5143,6 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con
{
result->mAvatarIDValid = true;
result->mAvatarID = id;
-
- if(result->updateMuteState())
- mMuteDirty = true;
}
else
{
@@ -5154,7 +5151,12 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con
setUUIDFromStringHash(result->mAvatarID, uri);
}
}
-
+
+ if(result->updateMuteState())
+ {
+ mMuteDirty = true;
+ }
+
mParticipantsByUUID.insert(participantUUIDMap::value_type(&(result->mAvatarID), result));
if (LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID, result->mVolume))
@@ -5173,15 +5175,12 @@ bool LLVoiceClient::participantState::updateMuteState()
{
bool result = false;
- if(mAvatarIDValid)
+ bool isMuted = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat);
+ if(mOnMuteList != isMuted)
{
- bool isMuted = LLMuteList::getInstance()->isMuted(mAvatarID, LLMute::flagVoiceChat);
- if(mOnMuteList != isMuted)
- {
- mOnMuteList = isMuted;
- mVolumeDirty = true;
- result = true;
- }
+ mOnMuteList = isMuted;
+ mVolumeDirty = true;
+ result = true;
}
return result;
}
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index e0d58a16c8..f544449d02 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2163,10 +2163,11 @@ Clears (deletes) the media and all params from the given face.
<string name="BusyModeResponseDefault">The Resident you messaged is in &apos;busy mode&apos; which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string>
<!-- Mute -->
- <string name="MuteByName">(by name)</string>
+ <string name="MuteByName">(By name)</string>
<string name="MuteAgent">(Resident)</string>
- <string name="MuteObject">(object)</string>
- <string name="MuteGroup">(group)</string>
+ <string name="MuteObject">(Object)</string>
+ <string name="MuteGroup">(Group)</string>
+ <string name="MuteExternal">(External)</string>
<!-- Region/Estate Covenant -->
<string name="RegionNoCovenant">There is no Covenant provided for this Estate.</string>