diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/guildmanager.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp index 7bc0444ed..eaee529b9 100644 --- a/src/guildmanager.cpp +++ b/src/guildmanager.cpp @@ -57,9 +57,6 @@ GuildManager::~GuildManager() void GuildManager::init() { - if (guildManager) - return; - int val = serverConfig.getValue("enableGuildBot", -1); if (val == -1) { @@ -71,7 +68,17 @@ void GuildManager::init() } mEnableGuildBot = val; if (mEnableGuildBot) - guildManager = new GuildManager(); + { + if (!guildManager) + guildManager = new GuildManager(); + else + guildManager->reload(); + } + else if (guildManager) + { + delete guildManager; + guildManager = 0; + } } void GuildManager::reload() |