diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-10-27 18:14:47 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-09 16:50:57 +0100 |
| commit | f7ba7dea0eff46cc9b7b3c3dfd8c5720a63dd7f4 (patch) | |
| tree | 3c32f3043e05093448040928787dec8258504df9 | |
| parent | 8802f1e8aaf3d5e324812a87715543d3c43a2d12 (diff) | |
| download | geldschieberbot-f7ba7dea0eff46cc9b7b3c3dfd8c5720a63dd7f4.tar.gz geldschieberbot-f7ba7dea0eff46cc9b7b3c3dfd8c5720a63dd7f4.zip | |
mention everyone and don't handle recipient
| -rw-r--r-- | geldschieberbot.py | 12 |
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) |
