1
0
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:
Sebastien Helleu
2007-12-07 15:01:37 +01:00
parent 495e6bd5df
commit 72a694ed4c
9 changed files with 230 additions and 23 deletions
+15
View File
@@ -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
*/