From 9f752d5431364c052b364045015d3574da2c320c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 30 Aug 2011 01:57:05 +0300 Subject: Dont create guild manager instance if guild bot support not enabled. --- src/gui/setup_other.cpp | 3 +++ src/gui/socialwindow.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp index 05ec9d672..1cad4c594 100644 --- a/src/gui/setup_other.cpp +++ b/src/gui/setup_other.cpp @@ -147,6 +147,9 @@ Setup_Other::Setup_Other() new SetupItemLabel(_("Bots support"), "", this); + new SetupItemCheckBox(_("Enable auction bot support"), "", + "enableAuctionBot", this, "enableAuctionBotEvent", false); + new SetupItemCheckBox(_("Enable guild bot support and disable native " "guild support"), "", "enableGuildBot", this, "enableGuildBotEvent", false); diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index ca52ea283..b9c8cb365 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -1311,7 +1311,7 @@ void SocialWindow::action(const gcn::ActionEvent &event) strprintf(_("Accepted guild invite from %s."), mPartyInviter.c_str())); } - if (!guildManager || !guildManager->getEnableGuildBot()) + if (!guildManager || !GuildManager::getEnableGuildBot()) Net::getGuildHandler()->inviteResponse(mGuildInvited, true); else guildManager->inviteResponse(true); @@ -1324,7 +1324,7 @@ void SocialWindow::action(const gcn::ActionEvent &event) strprintf(_("Rejected guild invite from %s."), mPartyInviter.c_str())); } - if (!guildManager || !guildManager->getEnableGuildBot()) + if (!guildManager || !GuildManager::getEnableGuildBot()) Net::getGuildHandler()->inviteResponse(mGuildInvited, false); else guildManager->inviteResponse(false); -- cgit v1.2.3-70-g09d2