Skip to content

Commit

Permalink
[isup] fix bad indexes preventing bot from recognizing http protocols
Browse files Browse the repository at this point in the history
`'http://'` is 7 characters long, so `site[:6]` can't ever match it. ditto for `'https://'` and `site[:7]`
  • Loading branch information
lramati committed Nov 9, 2015
1 parent 69f3a8e commit c84cafe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel/modules/isup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def isup(bot, trigger):
if not site:
return bot.reply("What site do you want to check?")

if site[:6] != 'http://' and site[:7] != 'https://':
if site[:7] != 'http://' and site[:8] != 'https://':
if '://' in site:
protocol = site.split('://')[0] + '://'
return bot.reply("Try it again without the %s" % protocol)
Expand Down

0 comments on commit c84cafe

Please sign in to comment.