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
This commit is contained in:
2
calc.py
2
calc.py
@@ -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])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user