summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmain.py3
-rw-r--r--player.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/main.py b/main.py
index 139f474..ebcc955 100755
--- a/main.py
+++ b/main.py
@@ -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>
diff --git a/player.py b/player.py
index 0c0894c..861dbf5 100644
--- a/player.py
+++ b/player.py
@@ -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: