summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-06-17 16:52:44 +0000
committerDavid Athay <ko2fan@gmail.com>2008-06-17 16:52:44 +0000
commit6d0785dc58aeba42f8cc5a1cb339749753f474c6 (patch)
tree437ab0fbdbc04bee44e2ae3c47f5b6641efe1479 /src
parent061f0dd698c40afa367db8b129c5ae319e92aade (diff)
downloadmana-6d0785dc58aeba42f8cc5a1cb339749753f474c6.tar.gz
mana-6d0785dc58aeba42f8cc5a1cb339749753f474c6.tar.bz2
mana-6d0785dc58aeba42f8cc5a1cb339749753f474c6.tar.xz
mana-6d0785dc58aeba42f8cc5a1cb339749753f474c6.zip
#333 Suppress 'trade with X cancelled' messages for ignored players.
Diffstat (limited to 'src')
-rw-r--r--src/net/tradehandler.cpp8
1 files changed, 6 insertions, 2 deletions
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;