native

set_module_filter

Syntax

native set_module_filter(const handler[]);

Description

This function sets a module/library filter. It will let you intercept the automatic requirement
of a module and return PLUGIN_CONTINUE to fail load or PLUGIN_HANDLED to imply that load
can continue even without the module.

This is the most unforgiving of the filter functions. You can ONLY call it during plugin_natives,
and any error that occurs is not filtered -- instead your plugin will fail to load as if you
returned PLUGIN_CONTINUE.

Your handler will be called with this prototype:

public module_filter(const library[], LibType:type);
library - library or class name of the module that is required
libtype - The type of requirement being checked (library/module or class).


set_module_filter() returns 0 on success (unlike most natives).