aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmutelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llmutelist.cpp')
-rw-r--r--linden/indra/newview/llmutelist.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp
index fff5558..022bf36 100644
--- a/linden/indra/newview/llmutelist.cpp
+++ b/linden/indra/newview/llmutelist.cpp
@@ -233,7 +233,7 @@ LLMuteList::LLMuteList() :
233 233
234void LLMuteList::loadUserVolumes() 234void LLMuteList::loadUserVolumes()
235{ 235{
236 // call once, after LLDir::setLindenUserDir() has been called 236 // call once, after LLDir::setViewerUserDir() has been called
237 if (mUserVolumesLoaded) 237 if (mUserVolumesLoaded)
238 return; 238 return;
239 mUserVolumesLoaded = TRUE; 239 mUserVolumesLoaded = TRUE;
@@ -264,8 +264,8 @@ LLMuteList::~LLMuteList()
264{ 264{
265 // If we quit from the login screen we will not have an SL account 265 // If we quit from the login screen we will not have an SL account
266 // name. Don't try to save, otherwise we'll dump a file in 266 // name. Don't try to save, otherwise we'll dump a file in
267 // C:\Program Files\SecondLife\ JC 267 // the install directory. JC
268 std::string user_dir = gDirUtilp->getLindenUserDir(true); 268 std::string user_dir = gDirUtilp->getViewerUserDir(true);
269 if (!user_dir.empty()) 269 if (!user_dir.empty())
270 { 270 {
271 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); 271 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml");
@@ -282,19 +282,11 @@ LLMuteList::~LLMuteList()
282 } 282 }
283} 283}
284 284
285BOOL LLMuteList::isLinden(const std::string& name) const 285BOOL LLMuteList::isGod(const std::string& name) const
286{ 286{
287 typedef boost::tokenizer<boost::char_separator<char> > tokenizer; 287 // Basing god status on the last name is bound to break in random grids.
288 boost::char_separator<char> sep(" "); 288 // Track down users of this and see if we can get their user level instead.
289 tokenizer tokens(name, sep); 289 return FALSE;
290 tokenizer::iterator token_iter = tokens.begin();
291
292 if (token_iter == tokens.end()) return FALSE;
293 token_iter++;
294 if (token_iter == tokens.end()) return FALSE;
295
296 std::string last_name = *token_iter;
297 return last_name == "Linden";
298} 290}
299 291
300 292
@@ -339,9 +331,9 @@ bool LLMuteList::addMuteCallback(const LLSD& notification, const LLSD& response,
339 331
340BOOL LLMuteList::add(const LLMute& mute, U32 flags) 332BOOL LLMuteList::add(const LLMute& mute, U32 flags)
341{ 333{
342 // Can't mute text from Lindens 334 // Can't mute text from gods
343 if ((mute.mType == LLMute::AGENT) 335 if ((mute.mType == LLMute::AGENT)
344 && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) 336 && isGod(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
345 { 337 {
346 LLNotifications::instance().add("MuteLinden"); 338 LLNotifications::instance().add("MuteLinden");
347 return FALSE; 339 return FALSE;