mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
Added completion hook, to let plugins add custom completions for commands
This commit is contained in:
@@ -1185,6 +1185,21 @@ plugin_api_hook_config (struct t_weechat_plugin *plugin, char *config_type,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* plugin_api_hook_completion: hook a completion
|
||||
*/
|
||||
|
||||
struct t_hook *
|
||||
plugin_api_hook_completion (struct t_weechat_plugin *plugin, char *completion,
|
||||
int (*callback)(void *, char *, void *),
|
||||
void *data)
|
||||
{
|
||||
if (plugin && callback)
|
||||
return hook_completion (plugin, completion, callback, data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* plugin_api_unhook: unhook something
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user