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. --- ChangeLog | 5 +++++ src/net/tradehandler.cpp | 8 ++++++-- tmw.cbp | 10 ++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e223439c..834a8c8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-17 Fate + + * src/net/tradehandler.cpp: bug #333: Suppress `trade with X cancelled' + messages for ignored players. + 2008-06-16 Fate * player_relations.h: Allow whispers by default. 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; diff --git a/tmw.cbp b/tmw.cbp index 9dae56cc..5943f74e 100644 --- a/tmw.cbp +++ b/tmw.cbp @@ -162,6 +162,8 @@ + + @@ -182,6 +184,8 @@ + + @@ -197,6 +201,10 @@ + + + + @@ -286,6 +294,8 @@ + + -- cgit v1.2.3-70-g09d2