aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--geldschieberbot.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/geldschieberbot.py b/geldschieberbot.py
index e158076..8723ff5 100644
--- a/geldschieberbot.py
+++ b/geldschieberbot.py
@@ -216,11 +216,13 @@ def handle_input(inp):
msg = ""
for p in parts.items():
- if p in name2num:
- balance[recipient][p[0]] -= p[1]
- balance[p[0]][recipient] += p[1]
- else:
- msg += p[0] + " not known. Please take care of the amount " + p[1] + " manually\n"
+ msg += p[0] + ": " + str(p[1])
+ if p != recipient:
+ if p in name2num:
+ balance[recipient][p[0]] -= p[1]
+ balance[p[0]][recipient] += p[1]
+ else:
+ msg += p[0] + " not known. Please take care manually\n"
msg += "New Balance:\n"
msg += create_summary(recipient)