more little things

This commit is contained in:
Luke Rogers 2014-02-14 16:30:38 +13:00
parent b4d7e200a3
commit 4447e6cd1f
9 changed files with 25 additions and 22 deletions

View file

@ -25,9 +25,9 @@ refresh_cache()
def mlia(inp, reply=None):
"""mlia -- Gets a random quote from MyLifeIsAverage.com."""
# grab the last item in the mlia cache and remove it
id, text = mlia_cache.pop()
mlia_id, text = mlia_cache.pop()
# reply with the mlia we grabbed
reply('({}) {}'.format(id, text))
reply('({}) {}'.format(mlia_id, text))
# refresh mlia cache if its getting empty
if len(mlia_cache) < 3:
refresh_cache()