New global function: add_hook: add a hook in the current context directly associated to the current module

This commit is contained in:
Némunaire 2012-10-15 02:20:01 +02:00
commit bbfd34fe7b
6 changed files with 28 additions and 27 deletions

View file

@ -15,8 +15,8 @@ def help_full ():
def load(context):
from hooks import Hook
context.hooks.add_hook("cmd_hook", Hook(cmd_syno, "syno"))
context.hooks.add_hook("cmd_hook", Hook(cmd_syno, "synonyme"))
add_hook("cmd_hook", Hook(cmd_syno, "syno"))
add_hook("cmd_hook", Hook(cmd_syno, "synonyme"))
def cmd_syno(msg):