diff options
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 1ab3c2e4..33dddf05 100644 --- a/src/net/tradehandler.h +++ b/src/net/tradehandler.h @@ -32,6 +32,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 |