From 8076d645b7a4271b9b5f100f5ea881891fea7d7c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 May 2017 01:22:28 +0300 Subject: Remove ServerFeatures::haveNativeGuilds and ServerFeatures::haveChatChannels. --- src/gui/popups/popupmenu.cpp | 2 +- src/gui/widgets/tabs/chat/chattab.cpp | 3 ++- src/gui/windows/chatwindow.cpp | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 450dcee1d..370700f48 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -3430,7 +3430,7 @@ void PopupMenu::addSocialMenu() mBrowserBox->addRow("/createparty", _("Create party")); } - if (serverFeatures->haveNativeGuilds()) + if (Net::getNetworkType() == ServerType::EATHENA) { const Guild *const guild = localPlayer->getGuild(); if (guild) diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 0a8d38355..9010d1406 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -44,6 +44,7 @@ #include "input/inputmanager.h" #include "net/chathandler.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "utils/chatutils.h" @@ -224,7 +225,7 @@ void ChatTab::chatLog(std::string line, } // if configured, move magic messages log to debug chat tab - if (!serverFeatures->haveChatChannels() + if (Net::getNetworkType() == ServerType::TMWATHENA && localChatTab && this == localChatTab && ((config.getBoolValue("showMagicInDebug") && own == ChatMsgType::BY_PLAYER diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 6e4cb591e..da4a256a1 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -71,6 +71,7 @@ #include "resources/db/textdb.h" #include "net/chathandler.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "utils/copynpaste.h" @@ -1299,8 +1300,9 @@ ChatTab *ChatWindow::addChatTab(const std::string &name, const bool switchTo, const bool join) { - if (serverFeatures->haveChatChannels() && name.size() > 1 - && name[0] == '#') + if (Net::getNetworkType() == ServerType::EATHENA && + name.size() > 1 && + name[0] == '#') { ChatTab *const tab = addChannelTab(name, switchTo); if (tab && join) @@ -1696,7 +1698,7 @@ bool ChatWindow::resortChatLog(std::string line, tryRemoveColors); } } - else if (serverFeatures->haveChatChannels()) + else if (Net::getNetworkType() == ServerType::EATHENA) { channelChatLog(channel, line, own, ignoreRecord, tryRemoveColors); return false; -- cgit v1.2.3-60-g2f50