mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +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 config
|
||||||
from . import plugin
|
from . import plugin
|
||||||
|
from . import handler
|
||||||
from importlib import reload
|
from importlib import reload
|
||||||
|
importlib.reload(handler) # In case we're being reloaded.
|
||||||
importlib.reload(plugin) # In case we're being reloaded.
|
importlib.reload(plugin) # In case we're being reloaded.
|
||||||
|
|
||||||
if world.testing:
|
if world.testing:
|
||||||
|
@ -73,6 +73,12 @@ class IrcHandler(logging.Handler):
|
|||||||
if networks and irc.network not in networks:
|
if networks and irc.network not in networks:
|
||||||
continue
|
continue
|
||||||
msgOk = True
|
msgOk = True
|
||||||
|
|
||||||
|
level = config.level.getSpecific(
|
||||||
|
network=network, channel=target)()
|
||||||
|
if level > record.levelno:
|
||||||
|
msgOk = False
|
||||||
|
|
||||||
if target in irc.state.channels:
|
if target in irc.state.channels:
|
||||||
channel = irc.state.channels[target]
|
channel = irc.state.channels[target]
|
||||||
modes = config.channelModesRequired.getSpecific(
|
modes = config.channelModesRequired.getSpecific(
|
||||||
|
Loading…
Reference in New Issue
Block a user