mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
Removed WeeChat "command" structure, now all internal commands are hooked when WeeChat starts
This commit is contained in:
@@ -306,7 +306,7 @@ alias_new (char *name, char *command)
|
||||
|
||||
if ((new_alias = ((struct t_alias *) malloc (sizeof (struct t_alias)))))
|
||||
{
|
||||
new_hook = weechat_hook_command (name, NULL, NULL, NULL, NULL,
|
||||
new_hook = weechat_hook_command (name, "[alias]", NULL, NULL, NULL,
|
||||
alias_cb, new_alias);
|
||||
if (!new_hook)
|
||||
{
|
||||
@@ -724,6 +724,7 @@ weechat_plugin_end ()
|
||||
{
|
||||
alias_config_write ();
|
||||
alias_free_all ();
|
||||
weechat_config_free (alias_config_file);
|
||||
weechat_unhook (alias_command);
|
||||
weechat_unhook (unalias_command);
|
||||
return PLUGIN_RC_SUCCESS;
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../core/weechat.h"
|
||||
#include "../core/wee-command.h"
|
||||
#include "../core/wee-config.h"
|
||||
#include "../core/wee-hook.h"
|
||||
#include "../core/wee-input.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "../core/weechat.h"
|
||||
#include "../core/wee-command.h"
|
||||
#include "../core/wee-config.h"
|
||||
#include "../core/wee-hook.h"
|
||||
#include "../core/wee-log.h"
|
||||
@@ -251,6 +250,7 @@ plugin_load (char *filename)
|
||||
new_plugin->config_reload = &plugin_api_config_reload;
|
||||
new_plugin->config_write = &plugin_api_config_write;
|
||||
new_plugin->config_write_line = &plugin_api_config_write_line;
|
||||
new_plugin->config_free = &plugin_api_config_free;
|
||||
new_plugin->config_get = &plugin_api_config_get;
|
||||
new_plugin->config_set = &plugin_api_config_set;
|
||||
new_plugin->plugin_config_get = &plugin_api_plugin_config_get;
|
||||
@@ -460,6 +460,9 @@ plugin_remove (struct t_weechat_plugin *plugin)
|
||||
if (plugin->next_plugin)
|
||||
(plugin->next_plugin)->prev_plugin = plugin->prev_plugin;
|
||||
|
||||
/* remove all config files */
|
||||
config_file_free_all_plugin (plugin);
|
||||
|
||||
/* remove all hooks */
|
||||
unhook_all_plugin (plugin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user