From 223641a3057a5abf0113440601e3b6330287d68b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Sep 2014 18:32:40 +0300 Subject: Use server features for online list. --- src/gui/windows/whoisonline.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/windows/whoisonline.cpp') 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) { -- cgit v1.2.3-60-g2f50