From 8c6ab17e579cf8f4e510ec324fc98b010ff01cb0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 2 Sep 2018 19:54:45 +0100 Subject: give an Exports object (actually, ExportsContex object) to each module, to facilitate things like !set and !channelset without using the events system --- IRCBot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'IRCBot.py') diff --git a/IRCBot.py b/IRCBot.py index 75751e91..ac1dd6bd 100644 --- a/IRCBot.py +++ b/IRCBot.py @@ -1,6 +1,6 @@ import os, select, sys, threading, time, traceback, uuid -import EventManager, IRCLineHandler, IRCServer, Logging +import EventManager, Exports, IRCLineHandler, IRCServer, Logging import ModuleManager, Timer class Bot(object): @@ -14,7 +14,9 @@ class Bot(object): self.running = True self.poll = select.epoll() self._events = EventManager.EventHook(self) - self.modules = ModuleManager.ModuleManager(self, self._events) + self._exports = Exports.Exports() + self.modules = ModuleManager.ModuleManager(self, self._events, + self._exports) self.log = Logging.Log(self) self.line_handler = IRCLineHandler.LineHandler(self, self._events) self.timers = [] -- cgit v1.3.1-10-gc9f91