remove hardcoded op
This commit is contained in:
parent
25ef5b19fd
commit
3d66b7e263
@ -1769,7 +1769,7 @@ RequestBroker::Request * Client::GetCommentsAsync(int saveID, int start, int cou
|
|||||||
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
|
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
|
||||||
std::string username = commentsArray[j]["Username"].asString();
|
std::string username = commentsArray[j]["Username"].asString();
|
||||||
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
|
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
|
||||||
if (formattedUsername == "jacobot" || formattedUsername == "Mrprocom")
|
if (formattedUsername == "jacobot")
|
||||||
formattedUsername = "\bt" + formattedUsername;
|
formattedUsername = "\bt" + formattedUsername;
|
||||||
std::string comment = commentsArray[j]["Text"].asString();
|
std::string comment = commentsArray[j]["Text"].asString();
|
||||||
commentArray->push_back(new SaveComment(userID, username, formattedUsername, comment));
|
commentArray->push_back(new SaveComment(userID, username, formattedUsername, comment));
|
||||||
|
@ -1491,8 +1491,7 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
|
|||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
if ((Client::Ref().GetAuthUser().UserElevation == User::ElevationModerator
|
if ((Client::Ref().GetAuthUser().UserElevation == User::ElevationModerator
|
||||||
|| Client::Ref().GetAuthUser().UserElevation == User::ElevationAdmin
|
|| Client::Ref().GetAuthUser().UserElevation == User::ElevationAdmin) && ctrl)
|
||||||
|| Client::Ref().GetAuthUser().Username == "Mrprocom") && ctrl)
|
|
||||||
{
|
{
|
||||||
std::string authorString = Client::Ref().GetAuthorInfo().toStyledString();
|
std::string authorString = Client::Ref().GetAuthorInfo().toStyledString();
|
||||||
new InformationMessage("Save authorship info", authorString, true);
|
new InformationMessage("Save authorship info", authorString, true);
|
||||||
|
@ -271,7 +271,7 @@ bool PreviewModel::ParseComments(char *commentsResponse)
|
|||||||
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
|
int userID = format::StringToNumber<int>(commentsArray[j]["UserID"].asString());
|
||||||
std::string username = commentsArray[j]["Username"].asString();
|
std::string username = commentsArray[j]["Username"].asString();
|
||||||
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
|
std::string formattedUsername = commentsArray[j]["FormattedUsername"].asString();
|
||||||
if (formattedUsername == "jacobot" || formattedUsername == "Mrprocom")
|
if (formattedUsername == "jacobot")
|
||||||
formattedUsername = "\bt" + formattedUsername;
|
formattedUsername = "\bt" + formattedUsername;
|
||||||
std::string comment = commentsArray[j]["Text"].asString();
|
std::string comment = commentsArray[j]["Text"].asString();
|
||||||
saveComments->push_back(new SaveComment(userID, username, formattedUsername, comment));
|
saveComments->push_back(new SaveComment(userID, username, formattedUsername, comment));
|
||||||
|
Reference in New Issue
Block a user