Check plugin API version in UCMD plugin.
This commit is contained in:
parent
a95e703b36
commit
a12e79c7ce
@ -483,6 +483,13 @@ int parse_config(struct plugin_handle* plugin, const char* config)
|
||||
int plugin_register(struct plugin_handle *plugin, const char *config){
|
||||
PLUGIN_INITIALIZE(plugin, "User command plugin", "0.1", "Provide custom commands to users.");
|
||||
|
||||
/* Need version 2 or later of the plugin API. */
|
||||
if(plugin->plugin_api_version < 2)
|
||||
{
|
||||
plugin->error_msg = "UCMD support requires version 2 or later of the plugin API";
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Attempt to parse the config we were given. */
|
||||
if(parse_config(plugin, config) == -1) return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user