mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
commands: support rehashing channel loggers
This commit is contained in:
parent
2503bd3ee5
commit
cf1de08457
@ -197,6 +197,13 @@ def rehash(irc, source, args):
|
||||
ircobj.conf = new_conf
|
||||
ircobj.serverdata = new_conf['servers'][network]
|
||||
ircobj.botdata = new_conf['bot']
|
||||
|
||||
# Clear the IRC object's channel logger and replace it with a
|
||||
# new one by re-running logSetup().
|
||||
log.removeHandler(ircobj.loghandler)
|
||||
ircobj.loghandler = None
|
||||
ircobj.logSetup()
|
||||
|
||||
for network, sdata in new_conf['servers'].items():
|
||||
# New server was added. Connect them if not already connected.
|
||||
if network not in world.networkobjects:
|
||||
|
Loading…
Reference in New Issue
Block a user