diff --git a/ameliabot/plugins/calc.py b/ameliabot/plugins/calc.py index 68be052..ce22da6 100644 --- a/ameliabot/plugins/calc.py +++ b/ameliabot/plugins/calc.py @@ -32,7 +32,7 @@ def __init__(self, server, appid): @regcmd('@calc (?P.+)$') def calculate(self, server, nick, user, host, target, msg, exp): for pod in self.client.query(exp): - if pod.text: + if getattr(pod, 'text', None): send_lines(server, target, pod.text.encode('utf-8')) @@ -46,3 +46,4 @@ def calculate(self, server, nick, user, host, target, msg, exp): +