aboutsummaryrefslogtreecommitdiff
path: root/IRCBot.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-08-29 12:20:25 +0100
committerGravatar jesopo2018-08-29 12:20:25 +0100
commitfead75cd2fa2996bee3500b2cbee3e484b680bca (patch)
tree7bf36359a03dc5bf343c08142cda84bae86cf8fe /IRCBot.py
parentChange throttling mechanics to be "x lines per y seconds" (diff)
signature
Refactor IRCLineHandler in to an object that uses .on("raw") events
Diffstat (limited to 'IRCBot.py')
-rw-r--r--IRCBot.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/IRCBot.py b/IRCBot.py
index 8a863899..c43dcb28 100644
--- a/IRCBot.py
+++ b/IRCBot.py
@@ -1,5 +1,7 @@
import os, select, sys, threading, time, traceback
-import EventManager, IRCLogging, IRCServer, ModuleManager, Timer
+
+import EventManager, IRCLineHandler, IRCLogging, IRCServer
+import ModuleManager, Timer
class Bot(object):
def __init__(self):
@@ -14,6 +16,7 @@ class Bot(object):
self.modules = ModuleManager.ModuleManager(self)
self.events = EventManager.EventHook(self)
self.log = IRCLogging.Log(self)
+ self.line_handler = IRCLineHandler.LineHandler(self)
self.timers = []
self.events.on("timer").on("reconnect").hook(self.reconnect)
self.events.on("boot").on("done").hook(self.setup_timers)