summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/windows/whoisonline.cpp9
-rw-r--r--src/gui/windows/whoisonline.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 61a588f00..57d36e57c 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -51,6 +51,7 @@
#include "net/net.h"
#include "net/packetlimiter.h"
#include "net/playerhandler.h"
+#include "net/serverfeatures.h"
#include "utils/gettext.h"
#include "utils/sdlhelper.h"
@@ -111,8 +112,8 @@ WhoIsOnline::WhoIsOnline() :
mAllowUpdate(true),
mShowLevel(false),
mUpdateOnlineList(config.getBoolValue("updateOnlineList")),
-
- mGroupFriends(true)
+ mGroupFriends(true),
+ mServerSideList(Net::getServerFeatures()->haveOnlineList())
{
mCurlError[0] = 0;
setWindowName("WhoIsOnline");
@@ -588,7 +589,7 @@ int WhoIsOnline::downloadThread(void *ptr)
void WhoIsOnline::download()
{
- if (serverVersion < 3)
+ if (!mServerSideList)
{
mDownloadComplete = true;
if (mThread && SDL_GetThreadID(mThread))
@@ -681,7 +682,7 @@ void WhoIsOnline::action(const ActionEvent &event)
{
if (event.getId() == "update")
{
- if (serverVersion < 3)
+ if (!mServerSideList)
{
if (mDownloadStatus == UPDATE_COMPLETE)
{
diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h
index 504013712..17890b9a7 100644
--- a/src/gui/windows/whoisonline.h
+++ b/src/gui/windows/whoisonline.h
@@ -168,6 +168,7 @@ class WhoIsOnline final : public Window,
bool mShowLevel;
bool mUpdateOnlineList;
bool mGroupFriends;
+ bool mServerSideList;
};
extern WhoIsOnline *whoIsOnline;