mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 05:44:06 +00:00
[Browser] Fix rules list
This commit is contained in:
parent
26445355e6
commit
96212e96f4
1 changed files with 5 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "ServerInfoDialog.hpp"
|
#include "ServerInfoDialog.hpp"
|
||||||
#include <apps/browser/netutils/Utils.hpp>
|
#include <apps/browser/netutils/Utils.hpp>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace RakNet;
|
using namespace RakNet;
|
||||||
|
@ -50,10 +51,11 @@ void ServerInfoDialog::refresh()
|
||||||
listPlugins->addItem(QString::fromStdString(plugin.name));
|
listPlugins->addItem(QString::fromStdString(plugin.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto iter = sd.second.rules.begin();
|
listRules->clear();
|
||||||
for (int i = 0; iter != sd.second.rules.end(); i++, iter++)
|
const static vector<std::string> defaultRules {"gamemode", "maxPlayers", "name", "passw", "players", "version"};
|
||||||
|
for (auto iter = sd.second.rules.begin();iter != sd.second.rules.end(); iter++)
|
||||||
{
|
{
|
||||||
if(i < 6)
|
if(::find(defaultRules.begin(), defaultRules.end(), iter->first) != defaultRules.end())
|
||||||
continue;
|
continue;
|
||||||
QString rule = QString::fromStdString(iter->first) + " : ";
|
QString rule = QString::fromStdString(iter->first) + " : ";
|
||||||
if(iter->second.type == 's')
|
if(iter->second.type == 's')
|
||||||
|
|
Loading…
Reference in a new issue