[PATCH v2 5/9] server: Move hooks struct initialization within add_hook.