diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-05 18:32:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:57 +0300 |
commit | 223641a3057a5abf0113440601e3b6330287d68b (patch) | |
tree | 609fb10397974a6e05fd18019b15f24c71beb8b9 /src | |
parent | 487d3be4cc8761e5697d4fb95d85e9da8dcaa42e (diff) | |
download | plus-223641a3057a5abf0113440601e3b6330287d68b.tar.gz plus-223641a3057a5abf0113440601e3b6330287d68b.tar.bz2 plus-223641a3057a5abf0113440601e3b6330287d68b.tar.xz plus-223641a3057a5abf0113440601e3b6330287d68b.zip |
Use server features for online list.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 9 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.h | 1 |
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; |