WebLogs: Prevent non-channel names to appear in the list if supybot.plugins.WebLogs.enabled is globally True.
parent
f26eb8e8da
commit
d37c38d867
|
@ -187,8 +187,9 @@ class WebLogsServerCallback(httpserver.SupyHTTPServerCallback):
|
|||
|
||||
def check_enabled(f):
|
||||
def newf(self, irc, msg):
|
||||
if self.registryValue('enabled', msg.args[0]):
|
||||
return f(self, irc, msg, WebLogsMiddleware(msg.args[0]))
|
||||
channel = msg.args[0]
|
||||
if irc.isChannel(channel) and self.registryValue('enabled', channel):
|
||||
return f(self, irc, msg, WebLogsMiddleware(channel))
|
||||
return msg
|
||||
return newf
|
||||
|
||||
|
|
Loading…
Reference in New Issue