resolve nick->user when doing self compare

master
Casey Link 2011-02-05 13:44:54 -05:00
parent 67e548366b
commit df48e246a7
1 changed files with 3 additions and 1 deletions

View File

@ -135,7 +135,9 @@ def tasteometer(phenny, input):
if not user2: if not user2:
user2 = input2 user2 = input2
if not user2 or len(user2) == 0: if not user2 or len(user2) == 0:
user2 = input.nick user2 = resolve_username(input.nick)
if not user2:
user2 = input.nick
try: try:
req = urlopen("%smethod=tasteometer.compare&type1=user&type2=user&value1=%s&value2=%s" % (APIURL, urlquote(user1), urlquote(user2))) req = urlopen("%smethod=tasteometer.compare&type1=user&type2=user&value1=%s&value2=%s" % (APIURL, urlquote(user1), urlquote(user2)))
except HTTPError, e: except HTTPError, e: