def load_module(bot, name, path, type_): module, mtime = sopel.loader.load_module(name, path, type_) relevant_parts = sopel.loader.clean_module(module, bot.config) bot.register(*relevant_parts) # TODO sys.modules[name] = module if hasattr(module, 'setup'): module.setup(bot) modified = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(mtime)) bot.reply('%r (version: %s)' % (module, modified))
def load_module(bot, name, path, type_): module, mtime = sopel.loader.load_module(name, path, type_) relevant_parts = sopel.loader.clean_module(module, bot.config) bot.register(*relevant_parts) # TODO sys.modules[name] = module if hasattr(module, 'setup'): module.setup(bot) modified = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(mtime)) bot.reply('%r (version: %s)' % (module, modified))