From 6d0785dc58aeba42f8cc5a1cb339749753f474c6 Mon Sep 17 00:00:00 2001 From: David Athay Date: Tue, 17 Jun 2008 16:52:44 +0000 Subject: #333 Suppress 'trade with X cancelled' messages for ignored players. --- src/net/tradehandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp index af000b3b..9599fa9d 100644 --- a/src/net/tradehandler.cpp +++ b/src/net/tradehandler.cpp @@ -125,8 +125,12 @@ void TradeHandler::handleMessage(MessageIn *msg) tradeWindow->setVisible(true); break; case 4: // Trade cancelled - chatWindow->chatLog("Trade with " + tradePartnerName + - " cancelled", BY_SERVER); + if (player_relations.hasPermission(tradePartnerName, + PlayerRelation::SPEECH_LOG)) + chatWindow->chatLog("Trade with " + tradePartnerName + + " cancelled", BY_SERVER); + // otherwise ignore silently + tradeWindow->setVisible(false); player_node->setTrading(false); break; -- cgit v1.2.3-70-g09d2