diff options
-rwxr-xr-x | main.py | 3 | ||||
-rw-r--r-- | player.py | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -260,7 +260,8 @@ def process_whisper(nick, msg, mapserv): mapserv.sendall(whisper(nick, data[0:len(data)-2]+".")) data = '' - mapserv.sendall(whisper(nick, data[0:len(data)-2]+".")) + if len(data) > 0: + mapserv.sendall(whisper(nick, data[0:len(data)-2]+".")) elif broken_string[0] == '!setslots': # Change the number of slots a user has - !setslots <slots> <name> @@ -6,6 +6,9 @@ This file is part of tradey, a trading bot in the mana world see www.themanaworld.org """ + +import copy + class Item: pass @@ -39,7 +42,7 @@ class Player: def check_inventory(self, user_tree, sale_tree): # Check the inventory state. - test_node = self.inventory.copy() + test_node = copy.deepcopy(self.inventory) for elem in sale_tree.root: item_found = False for item in test_node: |