diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/chat.cpp | 5 | ||||
-rw-r--r-- | src/actions/commands.cpp | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index c10a48fa3..a164e0f23 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -37,6 +37,7 @@ #include "net/guildhandler.h" #include "net/net.h" #include "net/partyhandler.h" +#include "net/serverfeatures.h" #include "utils/booleanoptions.h" #include "utils/gettext.h" @@ -74,7 +75,7 @@ static void outString(const ChatTab *const tab, { if (guild->getServerGuild()) { - if (tmwServerVersion > 0) + if (!Net::getServerFeatures()->haveNativeGuilds()) return; Net::getGuildHandler()->chat(guild->getId(), str); } @@ -273,7 +274,7 @@ impHandler(createParty) impHandler(createGuild) { - if (!event.tab || tmwServerVersion > 0) + if (!event.tab || !Net::getServerFeatures()->haveNativeGuilds()) return false; if (event.args.empty()) diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 692837ce6..c8829970f 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -40,8 +40,9 @@ #include "net/adminhandler.h" #include "net/chathandler.h" #include "net/guildhandler.h" -#include "net/pethandler.h" #include "net/net.h" +#include "net/pethandler.h" +#include "net/serverfeatures.h" #include "utils/chatutils.h" #include "utils/gettext.h" @@ -411,8 +412,11 @@ impHandler(sendMail) impHandler(info) { - if (!event.tab || !localPlayer || tmwServerVersion > 0) + if (!event.tab || !localPlayer + || !Net::getServerFeatures()->haveNativeGuilds()) + { return false; + } switch (event.tab->getType()) { |