diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/whoisonline.cpp | 17 |
1 files changed, 16 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)); |