Fix conditions to validate a hook
This commit is contained in:
parent
01e12970fb
commit
3aa705dfb6
2 changed files with 5 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ def load(context):
|
|||
add_event(ModuleEvent(intervalle=0, offset=d.total_seconds(), call=bonneannee))
|
||||
|
||||
from hooks import Hook
|
||||
add_hook("cmd_rgxp", Hook(cmd_timetoyear, data=yrn, regexp="[0-9]{4}"))
|
||||
add_hook("cmd_rgxp", Hook(cmd_timetoyear, data=yrn, regexp="^[0-9]{4}$"))
|
||||
add_hook("cmd_hook", Hook(cmd_newyear, str(yrn), yrn))
|
||||
add_hook("cmd_hook", Hook(cmd_newyear, "ny", yrn))
|
||||
add_hook("cmd_hook", Hook(cmd_newyear, "newyear", yrn))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue