X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/80d02bd8940750b5ac5e61974f9de3b0995ca979..9557ee54c1ff9e7866004937957eb57617627641:/erebus.py diff --git a/erebus.py b/erebus.py index 3091760..66f6cd2 100644 --- a/erebus.py +++ b/erebus.py @@ -14,6 +14,7 @@ class Erebus(object): mods = {} numhandlers = {} msghandlers = {} + chanhandlers = {} users = {} chans = {} @@ -203,9 +204,9 @@ class Erebus(object): def hookchan(self, chan, handler): try: - self.chanhandlers[word].append(handler) + self.chanhandlers[chan].append(handler) except: - self.chanhandlers[word] = [handler] + self.chanhandlers[chan] = [handler] def unhookchan(self, chan, handler): if chan in self.chanhandlers and handler in self.chanhandlers[chan]: self.chanhandlers[chan].remove(handler)