Added error checking for empty parameters

This commit is contained in:
Steve Vaught
2011-04-19 00:50:58 -04:00
parent 6c00d59973
commit 482161e98b
5 changed files with 12 additions and 0 deletions

View File

@@ -69,6 +69,8 @@ r_query = re.compile(
)
def gcs(phenny, input):
if not input.group(2):
return phenny.reply("Nothing to compare.")
queries = r_query.findall(input.group(2))
if len(queries) > 6:
return phenny.reply('Sorry, can only compare up to six things.')