Module hooks should be able to access module params
Currently, it is possible to create a hook as part of a module. For example, adding hooks.php to the modules/servers/foo/ folder would enable the hooks to be used by the Foo module.
Unfortunately, as opposed to when you are using the various module functions (ex: CreateAccount), you cannot access $params from the module within the module's hooks.
This makes it very difficult to make calls to external APIs as part of hooks, which would be extremely logical.
If you want to use aspects of the module's params in a hook, you either have to:
1) hard-code that information into the hook script
2) make mysql calls into the database to pull information from the module, which either involves
-- hard-coding ids into the hook script
-- requiring special words/tags/terms to be used in the module configuration so that you can search for them via mysql to get the right result
Since the hooks are already associated with the module, it would be logical for the module's information to be available within the module-specific hooks.
Let's say you have a provisioning module that creates a forum account. The "server" for that provisioning module is the place where the forum software lives. When a user comes to WHMCS to purchase their account, they fill out a desired username, and you would want to make an API call to the forum to check if that username is available.
Right now you either have to hard-code the url of the forum software into your hook (ShoppingCartValidateProductUpdate), or do some crazy mysql calls to determine the url of the forum. If you don't specifically code the IDs of this information into the hook script, then you have to use special strings and search for them.
All of this is really bad coding practice, and is really easy to break. Having a module's hooks have access to the module's configuration info would fix everything.