From 42c37857faf343e733f640deb18aae8082175c81 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Mon, 12 Dec 2011 02:10:51 -0500 Subject: [PATCH] linx: deal with no URL provided --- modules/linx.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/linx.py b/modules/linx.py index c742b4a..0ea67cb 100644 --- a/modules/linx.py +++ b/modules/linx.py @@ -12,11 +12,13 @@ def linx(phenny, input): """.linx - Upload a URL to linx.li.""" url = input.group(2) + if not url: + phenny.reply("No URL provided. CAN I HAS?") try: req = web.post("http://linx.li/vtluug", {'url': url}) except (HTTPError, IOError): - phenny.say("THE INTERNET IS FUCKING BROKEN. Please try again later.") + phenny.reply("THE INTERNET IS FUCKING BROKEN. Please try again later.") return data = json.loads(req)