summaryrefslogtreecommitdiff
path: root/src/net/tradehandler.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-10-18 10:56:40 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-10-18 10:56:40 +0000
commit8e0634da5736489ce5da5ab2ba9802c6c11e73cf (patch)
treea295338f18915022322664b46c22377093a3cbf3 /src/net/tradehandler.h
parentd7bf8a4b11a88d2fc49fbe996c22ca5512d25e75 (diff)
downloadmana-8e0634da5736489ce5da5ab2ba9802c6c11e73cf.tar.gz
mana-8e0634da5736489ce5da5ab2ba9802c6c11e73cf.tar.bz2
mana-8e0634da5736489ce5da5ab2ba9802c6c11e73cf.tar.xz
mana-8e0634da5736489ce5da5ab2ba9802c6c11e73cf.zip
Implemented automatic denying of trade requests based on a patch
submitted by Quiche_on_a_leash.
Diffstat (limited to 'src/net/tradehandler.h')
-rw-r--r--src/net/tradehandler.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/tradehandler.h b/src/net/tradehandler.h
index a1971004..00f2cf38 100644
--- a/src/net/tradehandler.h
+++ b/src/net/tradehandler.h
@@ -34,6 +34,24 @@ class TradeHandler : public MessageHandler
TradeHandler();
void handleMessage(MessageIn *msg);
+
+ /**
+ * Returns whether trade requests are accepted.
+ *
+ * @see setAcceptTradeRequests
+ */
+ bool acceptTradeRequests() const
+ { return mAcceptTradeRequests; }
+
+ /**
+ * Sets whether trade requests are accepted. When set to false, trade
+ * requests are automatically denied. When true, a popup will ask the
+ * player whether he wants to trade.
+ */
+ void setAcceptTradeRequests(bool acceptTradeRequests);
+
+ private:
+ bool mAcceptTradeRequests;
};
#endif