diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-10-18 10:56:40 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-10-18 10:56:40 +0000 |
commit | 8e0634da5736489ce5da5ab2ba9802c6c11e73cf (patch) | |
tree | a295338f18915022322664b46c22377093a3cbf3 /src/net/tradehandler.h | |
parent | d7bf8a4b11a88d2fc49fbe996c22ca5512d25e75 (diff) | |
download | mana-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.h | 18 |
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 |