diff options
author | jomo <github@jomo.tv> | 2015-01-11 00:00:39 +0100 |
---|---|---|
committer | jomo <github@jomo.tv> | 2015-01-11 00:00:39 +0100 |
commit | 9fa736691c468e3a0b5ecffe76cdb7ece45d8aa3 (patch) | |
tree | 16f4b1572d85585add241460bd3bb209c812de2a /calc.py | |
parent | 00fd8e4f1e7cc5d9c2d153d4753b07c242ebe58a (diff) |
only output numbers
we also support shifting (>>, <<), so the > and < characters are allowed which might lead to a bool type output
we don't want to show bool output
Diffstat (limited to 'calc.py')
-rw-r--r-- | calc.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -40,7 +40,7 @@ def on_calc_chat(event): message = event.getMessage() if not event.isCancelled() and uid(sender) in calc_users and sender.hasPermission(calc_perm): output = calc(message) - if output: + if type(output)in [int, float, long, complex]: msg(sender, "&2=== Calc: &e" + output[0] + " &2= &c" + output[1]) |