remove hardcoded op

This commit is contained in:
jacob1 2018-02-03 17:38:47 -05:00
parent 25ef5b19fd
commit 3d66b7e263
3 changed files with 3 additions and 4 deletions

View File

@ -1769,7 +1769,7 @@ RequestBroker::Request * Client::GetCommentsAsync(int saveID, int start, int cou
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
std::string username = commentsArray[j]["Username"].asString();
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
if (formattedUsername == "jacobot" || formattedUsername == "Mrprocom")
if (formattedUsername == "jacobot")
formattedUsername = "\bt" + formattedUsername;
std::string comment = commentsArray[j]["Text"].asString();
commentArray->push_back(new SaveComment(userID, username, formattedUsername, comment));

View File

@ -1491,8 +1491,7 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
break;
case 'a':
if ((Client::Ref().GetAuthUser().UserElevation == User::ElevationModerator
|| Client::Ref().GetAuthUser().UserElevation == User::ElevationAdmin
|| Client::Ref().GetAuthUser().Username == "Mrprocom") && ctrl)
|| Client::Ref().GetAuthUser().UserElevation == User::ElevationAdmin) && ctrl)
{
std::string authorString = Client::Ref().GetAuthorInfo().toStyledString();
new InformationMessage("Save authorship info", authorString, true);

View File

@ -271,7 +271,7 @@ bool PreviewModel::ParseComments(char *commentsResponse)
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
std::string username = commentsArray[j]["Username"].asString();
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
if (formattedUsername == "jacobot" || formattedUsername == "Mrprocom")
if (formattedUsername == "jacobot")
formattedUsername = "\bt" + formattedUsername;
std::string comment = commentsArray[j]["Text"].asString();
saveComments->push_back(new SaveComment(userID, username, formattedUsername, comment));