aboutsummaryrefslogtreecommitdiff
path: root/IRCBot.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-02 19:54:45 +0100
committerGravatar jesopo2018-09-02 19:54:45 +0100
commit8c6ab17e579cf8f4e510ec324fc98b010ff01cb0 (patch)
treec0437f76bbe9dea31f5f4599450ed5b492eedcd6 /IRCBot.py
parentIRCLogging -> Logging (diff)
give an Exports object (actually, ExportsContex object) to each module, to
facilitate things like !set and !channelset without using the events system
Diffstat (limited to 'IRCBot.py')
-rw-r--r--IRCBot.py6
1 files changed, 4 insertions, 2 deletions
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 = []