bing bong
This commit is contained in:
parent
a78a86602d
commit
6ff926246b
4 changed files with 6 additions and 7 deletions
|
@ -99,7 +99,7 @@ class Bot(threading.Thread):
|
|||
"""create the logger and config objects"""
|
||||
# logging
|
||||
self.logger = get_logger()
|
||||
self.logger.debug("Logging system ready.")
|
||||
self.logger.debug("Logging system initalised.")
|
||||
|
||||
# data folder
|
||||
self.data_dir = os.path.abspath('persist')
|
||||
|
@ -109,13 +109,13 @@ class Bot(threading.Thread):
|
|||
|
||||
# config
|
||||
self.config = config.Config(self)
|
||||
self.logger.debug("Config system ready.")
|
||||
self.logger.debug("Config system initalised.")
|
||||
|
||||
# db
|
||||
engine = create_engine('sqlite:///cloudbot.db')
|
||||
db_factory = sessionmaker(bind=engine)
|
||||
self.db_session = scoped_session(db_factory)
|
||||
self.logger.debug("Database system ready.")
|
||||
self.logger.debug("Database system initalised.")
|
||||
|
||||
|
||||
def connect(self):
|
||||
|
|
|
@ -50,7 +50,6 @@ class Config(dict):
|
|||
|
||||
def watcher(self):
|
||||
"""starts the watchdog to automatically reload the config when it changes on disk"""
|
||||
self.logger.debug("Starting config reloader.")
|
||||
self.observer = Observer()
|
||||
|
||||
pattern = "*{}".format(self.filename)
|
||||
|
|
|
@ -95,8 +95,8 @@ class PluginLoader(object):
|
|||
for type, data in obj._hook:
|
||||
# add plugin to the plugin list
|
||||
self.bot.plugins[type] += [data]
|
||||
if not loaded_all:
|
||||
self.bot.logger.info("Loaded plugin: {} ({})".format(format_plug(data), type))
|
||||
#if not loaded_all:
|
||||
self.bot.logger.info("Loaded plugin: {} ({})".format(format_plug(data), type))
|
||||
|
||||
# do a rebuild, unless the bot is loading all plugins (rebuild happens after load_all)
|
||||
if not loaded_all:
|
||||
|
|
|
@ -204,4 +204,4 @@ def main(bot, conn, out):
|
|||
input = Input(bot, conn, *out)
|
||||
input.inp = m
|
||||
|
||||
dispatch(input, "regex", func, args)
|
||||
dispatch(bot, input, "regex", func, args)
|
||||
|
|
Reference in a new issue