Changed gkstats command to respond that the user wasn't found on nonexistent users.

This commit is contained in:
Jeremy Fincher 2003-03-15 09:49:31 +00:00
parent d2f56143dc
commit fcdcd11ed5
1 changed files with 4 additions and 1 deletions

View File

@ -152,7 +152,10 @@ class Http(callbacks.Privmsg):
irc.reply(msg, '%s is rated %s and has %s active games; '
'W-%s, L-%s, D-%s' % (name, rating, games, w, l, d))
except AttributeError:
irc.error(msg, 'The format of the page was odd.')
if profile.find('User %s not found!' % name) != -1:
irc.error(msg, 'No user %s exists.')
else:
irc.error(msg, 'The format of the page was odd.')
except urllib2.URLError:
irc.error(msg, 'Couldn\'t connect to gameknot.com.')