summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/whoisonline.cpp15
-rw-r--r--src/gui/windows/whoisonline.h1
2 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index f06285984..4216303e5 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -112,7 +112,8 @@ WhoIsOnline::WhoIsOnline() :
mShowLevel(false),
mUpdateOnlineList(config.getBoolValue("updateOnlineList")),
mGroupFriends(true),
- mServerSideList(serverFeatures->haveServerOnlineList())
+ mServerSideList(serverFeatures->haveServerOnlineList()),
+ mWebList(serverFeatures->haveOnlineList())
{
mCurlError[0] = 0;
setWindowName("WhoIsOnline");
@@ -586,7 +587,12 @@ int WhoIsOnline::downloadThread(void *ptr)
void WhoIsOnline::download()
{
- if (!mServerSideList)
+ if (mServerSideList)
+ {
+ if (PacketLimiter::limitPackets(PACKET_ONLINELIST))
+ playerHandler->requestOnlineList();
+ }
+ else if (mWebList)
{
mDownloadComplete = true;
if (mThread && SDL_GetThreadID(mThread))
@@ -598,11 +604,6 @@ void WhoIsOnline::download()
if (mThread == nullptr)
mDownloadStatus = UPDATE_ERROR;
}
- else
- {
- if (PacketLimiter::limitPackets(PACKET_ONLINELIST))
- playerHandler->requestOnlineList();
- }
}
void WhoIsOnline::logic()
diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h
index 17890b9a7..c35008ddd 100644
--- a/src/gui/windows/whoisonline.h
+++ b/src/gui/windows/whoisonline.h
@@ -169,6 +169,7 @@ class WhoIsOnline final : public Window,
bool mUpdateOnlineList;
bool mGroupFriends;
bool mServerSideList;
+ bool mWebList;
};
extern WhoIsOnline *whoIsOnline;