diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-18 23:12:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-18 23:12:29 +0300 |
commit | 7f981b81b14612d9f35cd729401c63f9a019edd5 (patch) | |
tree | 696d13b6295fbd7f43dd19926293bcbf53ffcdc9 /src/gui/windows/whoisonline.cpp | |
parent | 9b8b9adbe47861db55c4e9a3d5dad16e4ec8401f (diff) | |
download | plus-7f981b81b14612d9f35cd729401c63f9a019edd5.tar.gz plus-7f981b81b14612d9f35cd729401c63f9a019edd5.tar.bz2 plus-7f981b81b14612d9f35cd729401c63f9a019edd5.tar.xz plus-7f981b81b14612d9f35cd729401c63f9a019edd5.zip |
Use server feature haveOnlineList in whos is online window.
Diffstat (limited to 'src/gui/windows/whoisonline.cpp')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 15 |
1 files changed, 8 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() |