Refactors hooks registration

This commit is contained in:
nemunaire 2015-11-02 20:19:12 +01:00
commit f39a0eac56
40 changed files with 202 additions and 168 deletions

View file

@ -23,7 +23,7 @@ def help_full():
def load(context):
context.data.setIndex("name", "score")
@hook("cmd_hook", "spell")
@hook.command("spell")
def cmd_spell(msg):
if not len(msg.args):
raise IMException("indique une orthographe approximative du mot dont tu veux vérifier l'orthographe.")
@ -61,7 +61,7 @@ def add_score(nick, t):
context.data.index[nick][t] = 1
context.save()
@hook("cmd_hook", "spellscore")
@hook.command("spellscore")
def cmd_score(msg):
res = list()
unknown = list()