From ec72846da42e47f4dfdd593137291ea5f9755de9 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 26 Mar 2010 13:07:24 -0600 Subject: * Check for incorrect settings for AHbot * Patch by click --HG-- branch : trunk --- src/game/AuctionHouseBot.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/game') diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp index df3d7d8dbc1..9c3d1afdc6c 100644 --- a/src/game/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot.cpp @@ -823,6 +823,20 @@ void AuctionHouseBot::Initialize() } LoadValues(&NeutralConfig); + // + // check if the AHBot account/GUID in the config actually exists + // + + if ((AHBplayerAccount != 0) || (AHBplayerGUID != 0)) + { + QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE account = %u AND guid = %u", AHBplayerAccount, AHBplayerGUID); + if (!result) + { + sLog.outError("AuctionHouseBot: The account/GUID-information set for your AHBot is incorrect (account: %u guid: %u)", AHBplayerAccount, AHBplayerGUID); + return; + } + } + if (AHBSeller) { QueryResult_AutoPtr results = QueryResult_AutoPtr(NULL); -- cgit v1.2.3