From f7ba7dea0eff46cc9b7b3c3dfd8c5720a63dd7f4 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 27 Oct 2017 18:14:47 +0200 Subject: mention everyone and don't handle recipient --- geldschieberbot.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'geldschieberbot.py') 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) -- cgit v1.2.3