mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Factoids: Fix NameErrors in HTTP callback.
This commit is contained in:
parent
4caf35f94b
commit
a4758146d8
@ -129,7 +129,7 @@ class FactoidsCallback(httpserver.SupyHTTPServerCallback):
|
|||||||
self.write(httpserver.get_template('factoids/index.html'))
|
self.write(httpserver.get_template('factoids/index.html'))
|
||||||
elif len(parts) == 2:
|
elif len(parts) == 2:
|
||||||
channel = utils.web.urlunquote(parts[0])
|
channel = utils.web.urlunquote(parts[0])
|
||||||
if not irc.isChannel(channel):
|
if not ircutils.isChannel(channel):
|
||||||
self.send_response(404)
|
self.send_response(404)
|
||||||
self.send_header('Content-type', 'text/html; charset=utf-8')
|
self.send_header('Content-type', 'text/html; charset=utf-8')
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
@ -138,8 +138,7 @@ class FactoidsCallback(httpserver.SupyHTTPServerCallback):
|
|||||||
{'title': 'Factoids - not a channel',
|
{'title': 'Factoids - not a channel',
|
||||||
'error': 'This is not a channel'})
|
'error': 'This is not a channel'})
|
||||||
return
|
return
|
||||||
if not self._plugin.registryValue('web.channel',
|
if not self._plugin.registryValue('web.channel', channel):
|
||||||
channel, irc.network):
|
|
||||||
self.send_response(403)
|
self.send_response(403)
|
||||||
self.send_header('Content-type', 'text/html; charset=utf-8')
|
self.send_header('Content-type', 'text/html; charset=utf-8')
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
Loading…
Reference in New Issue
Block a user