Skip to content

Commit

Permalink
Merge pull request CloudBotIRC#218 from linuxdaemon/gonzobot+observer…
Browse files Browse the repository at this point in the history
…-fix

Forgot to initialize the botwide observer
  • Loading branch information
edwardslabs authored Nov 14, 2017
2 parents 660a7d0 + 70eca51 commit 83547fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloudbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.schema import MetaData
from watchdog.observers import Observer

from cloudbot.client import Client
from cloudbot.clients.irc import IrcClient, irc_clean
Expand Down Expand Up @@ -118,6 +119,8 @@ def __init__(self, loop=asyncio.get_event_loop()):
# create bot connections
self.create_connections()

self.observer = Observer()

if self.plugin_reloading_enabled:
self.plugin_reloader = PluginReloader(self)

Expand Down Expand Up @@ -171,6 +174,8 @@ def stop(self, reason=None, *, restart=False):
logger.debug("Stopping plugin reloader.")
self.plugin_reloader.stop()

self.observer.stop()

for connection in self.connections.values():
if not connection.connected:
# Don't quit a connection that hasn't connected
Expand Down

0 comments on commit 83547fd

Please sign in to comment.