summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/tradehandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index bdbba9715..e91541cb7 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -121,6 +121,13 @@ void TradeHandler::processTradeRequest(Net::MessageIn &msg)
void TradeHandler::processTradeResponse(Net::MessageIn &msg)
{
+ if (confirmDlg || tradePartnerName.empty()
+ || !player_relations.hasPermission(tradePartnerName, PlayerRelation::TRADE))
+ {
+ Net::getTradeHandler()->respond(false);
+ return;
+ }
+
switch (msg.readInt8())
{
case 0: // Too far away