- def hookexception(self, exc):
- def realhook(func):
- self.exceptionhooks.append((exc, func))
- if self.parent is not None:
- self.parent.hookexception(exc, func)
- return func
- return realhook
-
- def hooknum(self, num):
- def realhook(func):
- self.numhooks[str(num)] = func
- if self.parent is not None:
- self.parent.hooknum(str(num), func)
- return func
- return realhook
-
- def hookchan(self, chan, glevel=ANYONE, clevel=PUBLIC):
- def realhook(func):
- self.chanhooks[chan] = func
- if self.parent is not None:
- self.parent.hookchan(chan, func)
- return func
- return realhook
-