Skip to content

Commit

Permalink
fixed a bug in .seen related to uppercase and lowercase variations on…
Browse files Browse the repository at this point in the history
… nicks
  • Loading branch information
ask-compu committed Mar 19, 2016
1 parent 3823b72 commit bd78016
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/seen.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def seen(phenny, input):
conn = db_connect(seen_db)
c = conn.cursor()
query = (inputnick,)
c.execute("SELECT * FROM seen WHERE nick LIKE ?;", query)
c.execute("SELECT * FROM seen WHERE nick LIKE ? COLLATE NOCASE ORDER BY time DESC LIMIT 1;", query)
resultsun = c.fetchall()
gotresults = True
else:
Expand All @@ -78,9 +78,9 @@ def seen(phenny, input):
phenny.say ("\x01ACTION pokes " + input.nick + "\x01")
phenny.say("Are you broken?")
phenny.say("I need a nick for that command")
elif input.nick == inputnick:
elif input.nick.upper().lower() == inputnick.upper().lower():
phenny.say("Silly, that's you!")
elif inputnick == phenny.nick:
elif inputnick.upper().lower() == phenny.nick.upper().lower():
phenny.say("Silly, that's me!")
elif not nick:
phenny.say("Sorry I haven't seen " + inputnick)
Expand Down

0 comments on commit bd78016

Please sign in to comment.