from __future__ import print_function
import os, sys, select, time, traceback, random, gc
-import bot, config, ctlmod
+import bot, config, ctlmod, modlib
class Erebus(object): #singleton to pass around
APIVERSION = 0
self.bots[nick.lower()] = obj
def newfd(self, obj, fileno):
+ if not isinstance(obj, modlib.Socketlike):
+ raise Exception('Attempted to hook a socket without a class to process data')
self.fds[fileno] = obj
if self.potype == "poll":
self.po.register(fileno, select.POLLIN)