WebLogs: Prevent non-channel names to appear in the list if supybot.plugins.WebLogs.enabled is globally True.

master
Valentin Lorentz 2011-10-02 15:30:28 +02:00
parent f26eb8e8da
commit d37c38d867
1 changed files with 3 additions and 2 deletions

View File

@ -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