diff options
-rw-r--r-- | src/guildmanager.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp index 0e9999977..f3fee9f44 100644 --- a/src/guildmanager.cpp +++ b/src/guildmanager.cpp @@ -37,6 +37,7 @@ #include "net/chathandler.h" #include "net/packetlimiter.h" +#include "net/serverfeatures.h" #include "utils/delete2.h" #include "utils/timer.h" @@ -72,16 +73,23 @@ GuildManager::~GuildManager() void GuildManager::init() { - int val = serverConfig.getValue("enableGuildBot", -1); - if (val == -1) + if (serverFeatures->haveNativeGuilds()) { - if (client->isTmw()) - val = 1; - else - val = 0; - serverConfig.setValue("enableGuildBot", val); + mEnableGuildBot = false; + } + else + { + int val = serverConfig.getValue("enableGuildBot", -1); + if (val == -1) + { + if (client->isTmw()) + val = 1; + else + val = 0; + serverConfig.setValue("enableGuildBot", val); + } + mEnableGuildBot = val; } - mEnableGuildBot = val; if (mEnableGuildBot) { if (!guildManager) |