From 24308d6983b11904040e2731015ddcf2eec4139b Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 4 Nov 2015 12:12:30 -0800 Subject: [PATCH] no fun allowed --- plugins/printerfact.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/printerfact.py b/plugins/printerfact.py index d97ce41..097bcfb 100644 --- a/plugins/printerfact.py +++ b/plugins/printerfact.py @@ -11,6 +11,9 @@ def php_fact(inp): @hook.regex("(.*) fact$") def printerfact(inp, say=None): + if len(inp.group(1).split()) != 1: + return None + r = requests.get('https://catfacts-api.appspot.com/api/facts?number=1') fact = r.json()['facts'][0] inp = inp.group(1)