diff options
author | Dipesh Amin <yaypunkrock@gmail.com> | 2011-09-01 15:35:59 +0100 |
---|---|---|
committer | Dipesh Amin <yaypunkrock@gmail.com> | 2011-09-01 15:35:59 +0100 |
commit | 2e93877e156bec25dd9ab2038ed88b35f438515b (patch) | |
tree | f36a6da2202801e7aa4400a7222277fc4c572781 | |
parent | f2c66d5930646d7efea74a1693481827cfea18e6 (diff) | |
download | manamarket-2e93877e156bec25dd9ab2038ed88b35f438515b.tar.gz manamarket-2e93877e156bec25dd9ab2038ed88b35f438515b.tar.bz2 manamarket-2e93877e156bec25dd9ab2038ed88b35f438515b.tar.xz manamarket-2e93877e156bec25dd9ab2038ed88b35f438515b.zip |
If it's not going to add the item, lets make sure it cancels the trade before
it can be accepted.
Hopefully we can figure out what is wrong with this, but leave this their for
now, so the bot doesn't "scam" people.
-rwxr-xr-x | main.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -842,6 +842,10 @@ def main(): if trader_state.item.price == 0: # getback mapserv.sendall(str(PacketOut(CMSG_TRADE_OK))) trader_state.complete = 1 + else: + mapserv.sendall(str(PacketOut(CMSG_TRADE_CANCEL_REQUEST))) + logging.info("Trade response: Trade accepted (buy) - the item could not be added.") + mapserv.sendall(whisper(trader_state.item.player, "Sorry, a problem has occured.")) elif trader_state.money: # money amount = int(user_tree.get_user(trader_state.money).get('money')) |