Propagate 'settings' to IRCHandler() and TelegramHandler()
patch b07534112c075b3b057cf9d514264cd5283cae33
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun Dec 12 02:15:52 CET 2021
* Propagate 'settings' to IRCHandler() and TelegramHandler()
hunk ./irc.py 49
- def __init__(self, config_dir):
+ def __init__(self, settings):
hunk ./irc.py 53
- self.config_dir = config_dir
hunk ./irgramd 19
- def __init__(self, logger, config_direc, settings):
+ def __init__(self, logger, settings):
hunk ./irgramd 41
- self.config_dir = config_direc
hunk ./irgramd 48
- async def run(self):
+ async def run(self, settings):
hunk ./irgramd 51
- self.irc_handler = IRCHandler(self.config_dir)
- self.tg_handler = TelegramHandler(self.irc_handler, self.config_dir)
+ self.irc_handler = IRCHandler(settings)
+ self.tg_handler = TelegramHandler(self.irc_handler, settings)
hunk ./irgramd 87
-
- irc_server = IRCTelegramd(logger, config_dir, options)
- asyncio.get_event_loop().run_until_complete(irc_server.run())
+ options['config_dir'] = config_dir
+
+ irc_server = IRCTelegramd(logger, options)
+ asyncio.get_event_loop().run_until_complete(irc_server.run(options))
hunk ./telegram.py 30
- def __init__(self, irc, config_dir):
+ def __init__(self, irc, settings):
hunk ./telegram.py 32
- self.config_dir = config_dir
+ self.config_dir = settings['config_dir']