From 3d66b7e2637f2b63c00830d75a4a593e13a69f83 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 3 Feb 2018 17:38:47 -0500 Subject: [PATCH] remove hardcoded op --- src/client/Client.cpp | 2 +- src/gui/game/GameView.cpp | 3 +-- src/gui/preview/PreviewModel.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 2d70682ba..4112a3e2b 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -1769,7 +1769,7 @@ RequestBroker::Request * Client::GetCommentsAsync(int saveID, int start, int cou int userID = format::StringToNumber(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)); diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 4e73a27a8..5b92dab99 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -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); diff --git a/src/gui/preview/PreviewModel.cpp b/src/gui/preview/PreviewModel.cpp index 652ee35b0..663883922 100644 --- a/src/gui/preview/PreviewModel.cpp +++ b/src/gui/preview/PreviewModel.cpp @@ -271,7 +271,7 @@ bool PreviewModel::ParseComments(char *commentsResponse) int userID = format::StringToNumber(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));