removed nickname requirement

master
Andrei M 2012-03-28 21:51:28 -04:00
parent d62d7f26d1
commit 76a991f842
1 changed files with 8 additions and 5 deletions

View File

@ -40,7 +40,10 @@ def lines(phenny, input):
info = input.group(2).split(" ") info = input.group(2).split(" ")
if len(info) == 1: if len(info) == 0:
nickname = input.nick
date = "today"
elif len(info) == 1:
nickname = info[0] nickname = info[0]
date = "today" date = "today"
elif len(info) == 2: elif len(info) == 2:
@ -49,13 +52,13 @@ def lines(phenny, input):
else: else:
phenny.reply(".lines <nickname> (<today/yesterday/YYYYMMDD>) - Returns the number of lines a user posted on a specific date.") phenny.reply(".lines <nickname> (<today/yesterday/YYYYMMDD>) - Returns the number of lines a user posted on a specific date.")
return return
else:
phenny.reply(".lines <nickname> (<today/yesterday/YYYYMMDD>) - Returns the number of lines a user posted on a specific date.")
return
else:
nickname = input.nick
date = "today"
try: try:
req = web.post("http://linx.li/vtluuglines", {'nickname': nickname, 'date': date}) req = web.post("http://linx.li/vtluuglines", {'nickname': nickname, 'date': date, 'sender': input.nick})
except (HTTPError, IOError): except (HTTPError, IOError):
phenny.reply("THE INTERNET IS FUCKING BROKEN. Please try again later.") phenny.reply("THE INTERNET IS FUCKING BROKEN. Please try again later.")
return return