diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-01 00:29:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-01 00:29:14 +0300 |
commit | 00509dd2dc2d0eed4b1ccc0788ab5b721deb7228 (patch) | |
tree | 6ea8be55b96b74f8a6603736757ee1ef56f97244 /src | |
parent | 9359de081508e8494fe137b49264a032f44f12ac (diff) | |
download | plus-00509dd2dc2d0eed4b1ccc0788ab5b721deb7228.tar.gz plus-00509dd2dc2d0eed4b1ccc0788ab5b721deb7228.tar.bz2 plus-00509dd2dc2d0eed4b1ccc0788ab5b721deb7228.tar.xz plus-00509dd2dc2d0eed4b1ccc0788ab5b721deb7228.zip |
Remove ServerFeatures haveOnlineList, because it depend only on server type.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.h | 2 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.h | 2 | ||||
-rw-r--r-- | src/net/serverfeatures.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/serverfeatures.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/serverfeatures.h | 2 |
7 files changed, 7 insertions, 17 deletions
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 140815c02..119b31664 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -58,6 +58,8 @@ #include "utils/gettext.h" #include "utils/sdlhelper.h" +#include "net/net.h" + #ifndef TMWA_SUPPORT #include <curl/curl.h> #endif // TMWA_SUPPORT @@ -118,7 +120,9 @@ WhoIsOnline::WhoIsOnline() : mUpdateOnlineList(config.getBoolValue("updateOnlineList")), mGroupFriends(true), mServerSideList(serverFeatures->haveServerOnlineList()), - mWebList(serverFeatures->haveOnlineList()) +#ifdef TMWA_SUPPORT + mWebList(Net::getNetworkType() == ServerType::TMWATHENA) +#endif { mCurlError[0] = 0; setWindowName("WhoIsOnline"); diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h index fc947b527..4ba71b49f 100644 --- a/src/gui/windows/whoisonline.h +++ b/src/gui/windows/whoisonline.h @@ -172,7 +172,9 @@ class WhoIsOnline final : public Window, bool mUpdateOnlineList; bool mGroupFriends; bool mServerSideList; +#ifdef TMWA_SUPPORT bool mWebList; +#endif }; extern WhoIsOnline *whoIsOnline; diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index 2d83915d2..d1100882e 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -41,11 +41,6 @@ bool ServerFeatures::haveServerOnlineList() const return serverVersion > 0; } -bool ServerFeatures::haveOnlineList() const -{ - return false; -} - bool ServerFeatures::havePartyNickInvite() const { return true; diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index a9d748691..d0b113cd2 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -36,8 +36,6 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerOnlineList() const override final; - bool haveOnlineList() const override final A_CONST; - bool havePartyNickInvite() const override final A_CONST; bool haveChangePartyLeader() const override final A_CONST; diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h index 1e73add7c..982fa2189 100644 --- a/src/net/serverfeatures.h +++ b/src/net/serverfeatures.h @@ -38,8 +38,6 @@ class ServerFeatures notfinal virtual bool haveServerOnlineList() const = 0; - virtual bool haveOnlineList() const = 0; - virtual bool havePartyNickInvite() const = 0; virtual bool haveChangePartyLeader() const = 0; diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp index 2341435e6..0dd3f2a0a 100644 --- a/src/net/tmwa/serverfeatures.cpp +++ b/src/net/tmwa/serverfeatures.cpp @@ -39,11 +39,6 @@ bool ServerFeatures::haveServerOnlineList() const return false; } -bool ServerFeatures::haveOnlineList() const -{ - return true; -} - bool ServerFeatures::havePartyNickInvite() const { return false; diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h index f05d04ae3..2c8165865 100644 --- a/src/net/tmwa/serverfeatures.h +++ b/src/net/tmwa/serverfeatures.h @@ -36,8 +36,6 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerOnlineList() const override final A_CONST; - bool haveOnlineList() const override final A_CONST; - bool havePartyNickInvite() const override final A_CONST; bool haveChangePartyLeader() const override final A_CONST; |