summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-02 11:51:08 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-02 11:51:08 +0300
commit1d168f911b1d09a8086977fa574bda71984aac88 (patch)
tree2077e3d1f978d5a5143ef4a47e34fad53f33a1cb
parent1911170833f19d8639adc27772aa5246d7438b6f (diff)
downloadplus-1d168f911b1d09a8086977fa574bda71984aac88.tar.gz
plus-1d168f911b1d09a8086977fa574bda71984aac88.tar.bz2
plus-1d168f911b1d09a8086977fa574bda71984aac88.tar.xz
plus-1d168f911b1d09a8086977fa574bda71984aac88.zip
Dont try enable guild bot if server have native guilds.
-rw-r--r--src/guildmanager.cpp24
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)