Factoids: Fix NameErrors in HTTP callback.

This commit is contained in:
Valentin Lorentz 2021-06-01 12:16:34 +02:00
parent 4caf35f94b
commit a4758146d8

View File

@ -129,7 +129,7 @@ class FactoidsCallback(httpserver.SupyHTTPServerCallback):
self.write(httpserver.get_template('factoids/index.html'))
elif len(parts) == 2:
channel = utils.web.urlunquote(parts[0])
if not irc.isChannel(channel):
if not ircutils.isChannel(channel):
self.send_response(404)
self.send_header('Content-type', 'text/html; charset=utf-8')
self.end_headers()
@ -138,8 +138,7 @@ class FactoidsCallback(httpserver.SupyHTTPServerCallback):
{'title': 'Factoids - not a channel',
'error': 'This is not a channel'})
return
if not self._plugin.registryValue('web.channel',
channel, irc.network):
if not self._plugin.registryValue('web.channel', channel):
self.send_response(403)
self.send_header('Content-type', 'text/html; charset=utf-8')
self.end_headers()