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 | |
parent | 9b8b9adbe47861db55c4e9a3d5dad16e4ec8401f (diff) | |
download | manaverse-7f981b81b14612d9f35cd729401c63f9a019edd5.tar.gz manaverse-7f981b81b14612d9f35cd729401c63f9a019edd5.tar.bz2 manaverse-7f981b81b14612d9f35cd729401c63f9a019edd5.tar.xz manaverse-7f981b81b14612d9f35cd729401c63f9a019edd5.zip |
Use server feature haveOnlineList in whos is online window.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 15 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.h | 1 |
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; |