mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
Added proper response for invalid hostnames
This commit is contained in:
parent
c49bd6f88f
commit
fcb0403711
@ -283,6 +283,8 @@ class Http(callbacks.Privmsg):
|
|||||||
html = m.group(1)
|
html = m.group(1)
|
||||||
s = utils.htmlToText(html, tagReplace='').strip('\xa0 ')
|
s = utils.htmlToText(html, tagReplace='').strip('\xa0 ')
|
||||||
irc.reply(msg, s[9:]) # Snip off "the site"
|
irc.reply(msg, s[9:]) # Snip off "the site"
|
||||||
|
elif html.find('We could not get any results') != -1:
|
||||||
|
irc.reply('No results found for %s' % hostname)
|
||||||
else:
|
else:
|
||||||
irc.error(msg, 'The format of the was odd.')
|
irc.error(msg, 'The format of the was odd.')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user