mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-22 18:39:31 +01:00
LogToIrc: Honor the configured log level
This commit is contained in:
parent
76bd1c89bf
commit
070090ffc5
@ -51,7 +51,9 @@ __contributors__ = {}
|
||||
|
||||
from . import config
|
||||
from . import plugin
|
||||
from . import handler
|
||||
from importlib import reload
|
||||
importlib.reload(handler) # In case we're being reloaded.
|
||||
importlib.reload(plugin) # In case we're being reloaded.
|
||||
|
||||
if world.testing:
|
||||
|
@ -73,6 +73,12 @@ class IrcHandler(logging.Handler):
|
||||
if networks and irc.network not in networks:
|
||||
continue
|
||||
msgOk = True
|
||||
|
||||
level = config.level.getSpecific(
|
||||
network=network, channel=target)()
|
||||
if level > record.levelno:
|
||||
msgOk = False
|
||||
|
||||
if target in irc.state.channels:
|
||||
channel = irc.state.channels[target]
|
||||
modes = config.channelModesRequired.getSpecific(
|
||||
|
Loading…
Reference in New Issue
Block a user