diff options
-rw-r--r-- | src/gui/whoisonline.cpp | 17 | ||||
-rw-r--r-- | src/playerrelations.cpp | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index ead38f42b..e0fa4ebcf 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -198,6 +198,7 @@ void WhoIsOnline::loadList() std::vector<std::string> friends; std::vector<std::string> neutral; std::vector<std::string> disregard; + std::vector<std::string> enemy; // Tokenize and add each line separately char *line = strtok(mMemoryBuffer, "\n"); @@ -270,6 +271,7 @@ void WhoIsOnline::loadList() switch (player_relations.getRelation(nick)) { case PlayerRelation::NEUTRAL: + default: neutral.push_back(prepareNick(nick, level, "0")); break; @@ -282,9 +284,12 @@ void WhoIsOnline::loadList() disregard.push_back(prepareNick(nick, level, "8")); break; + case PlayerRelation::ENEMY2: + enemy.push_back(prepareNick(nick, level, "1")); + break; + case PlayerRelation::IGNORED: case PlayerRelation::ERASED: - default: //Ignore the ignored. break; } @@ -316,6 +321,16 @@ void WhoIsOnline::loadList() mBrowserBox->addRow("---"); addedFromSection = false; } + for (int i = 0; i < static_cast<int>(enemy.size()); i++) + { + mBrowserBox->addRow(enemy.at(i)); + addedFromSection = true; + } + if (addedFromSection == true) + { + mBrowserBox->addRow("---"); + addedFromSection = false; + } for (int i = 0; i < static_cast<int>(neutral.size()); i++) { mBrowserBox->addRow(neutral.at(i)); diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp index 324dac065..1bf63aa81 100644 --- a/src/playerrelations.cpp +++ b/src/playerrelations.cpp @@ -282,6 +282,7 @@ unsigned int PlayerRelationsManager::checkPermissionSilently( case PlayerRelation::IGNORED: case PlayerRelation::ERASED: case PlayerRelation::BLACKLISTED: + case PlayerRelation::ENEMY2: default: permissions &= mDefaultPermissions; // narrow } |