[PATCH v3 3/7] server: Move hooks struct initialization within add_hook.