Skip to content
Snippets Groups Projects
Commit e62444c0 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

MAINT-7443 FIXED Able to Block a user with Lastname Linden

parent fe49c1e8
Branches
Tags
No related merge requests found
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <boost/tokenizer.hpp> #include <boost/tokenizer.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/algorithm/string/replace.hpp>
#include "lldispatcher.h" #include "lldispatcher.h"
#include "llxfermanager.h" #include "llxfermanager.h"
...@@ -180,9 +181,10 @@ LLMuteList::~LLMuteList() ...@@ -180,9 +181,10 @@ LLMuteList::~LLMuteList()
BOOL LLMuteList::isLinden(const std::string& name) const BOOL LLMuteList::isLinden(const std::string& name) const
{ {
std::string username = boost::replace_all_copy(name, ".", " ");
typedef boost::tokenizer<boost::char_separator<char> > tokenizer; typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" "); boost::char_separator<char> sep(" ");
tokenizer tokens(name, sep); tokenizer tokens(username, sep);
tokenizer::iterator token_iter = tokens.begin(); tokenizer::iterator token_iter = tokens.begin();
if (token_iter == tokens.end()) return FALSE; if (token_iter == tokens.end()) return FALSE;
...@@ -190,7 +192,8 @@ BOOL LLMuteList::isLinden(const std::string& name) const ...@@ -190,7 +192,8 @@ BOOL LLMuteList::isLinden(const std::string& name) const
if (token_iter == tokens.end()) return FALSE; if (token_iter == tokens.end()) return FALSE;
std::string last_name = *token_iter; std::string last_name = *token_iter;
return last_name == "Linden"; LLStringUtil::toLower(last_name);
return last_name == "linden";
} }
static LLVOAvatar* find_avatar(const LLUUID& id) static LLVOAvatar* find_avatar(const LLUUID& id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment