This fixes a compiler warning when compiling without HAVE_BLUA (why does this exist) and does a bit of cleanup with the addHook code.
HAVE_BLUA
addHook